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.3k Fix ERROR 1045 (28000): Access denied for user 'root'@'ip-address' (using password: YES)
+14.4k Golang : Convert(cast) int to float example
+15.1k Golang : How to get Unix file descriptor for console and file
+11k CodeIgniter : How to check if a session exist in PHP?
+46.2k Golang : Marshal and unmarshal json.RawMessage struct example
+5.9k PageSpeed : Clear or flush cache on web server
+7.9k Golang : Handle Palindrome string with case sensitivity and unicode
+10.2k Golang : Convert file unix timestamp to UTC time example
+17.6k Golang : How to make a file read only and set it to writable again?
+11.8k Golang : Convert(cast) bigint to string
+8.1k Golang : Auto-generate reply email with text/template package
+7.7k Golang : Example of how to detect which type of script a word belongs to