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
+10.9k Golang : How to detect a server/machine network interface capabilities?
+14.5k Golang : Get digits from integer before and after given position example
+8.3k Golang : How to check if a string with spaces in between is numeric?
+5.6k Unix/Linux : Use netstat to find out IP addresses served by your website server
+5.8k Golang : Calculate pivot points for a cross
+11.7k Golang : zlib compress file example
+13k Golang : convert(cast) string to float value
+9.9k Golang : Roll the dice example
+11.6k Golang : Arithmetic operation with numerical slices or arrays example
+7.1k Golang : Load DSA public key from file example
+9.3k Golang : Convert file content to Hex