Javascript : How to refresh page with JQuery ?
Sometimes, easy thing such as refreshing a page with javascript or jquery is the hardest thing to remember. To refresh a page with JQuery, use this code fragment below :
$('#yourbuttonid').click(function() {
location.reload();
});
Options that you might to know about
location.reload(false) - Default setting and will reload the current page from the cache.
location.reload(true) - Force a reload from the server.
By Adam Ng
IF you gain some knowledge or the information here solved your programming problem. Please consider donating to the less fortunate or some charities that you like. Apart from donation, planting trees, volunteering or reducing your carbon footprint will be great too.
Advertisement
Tutorials
+9.6k Golang : Find correlation coefficient example
+12.2k Golang : Get month name from date example
+4.5k Javascript : Detect when console is activated and do something about it
+15.4k Golang : Force download file example
+9.4k Golang : Qt Yes No and Quit message box example
+8.3k Golang : Implementing class(object-oriented programming style)
+6.2k Golang : Extract sub-strings
+7.3k Golang : Example of custom handler for Gorilla's Path usage.
+8.2k Golang : Emulate NumPy way of creating matrix example
+8.8k Golang : Gaussian blur on image and camera video feed examples
+6.5k Elasticsearch : Shutdown a local node