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
+13k Golang : How to get a user home directory path?
+6.1k Linux/Unix : Commands that you need to be careful about
+7.8k Javascript : How to check a browser's Do Not Track status?
+5.1k Golang : Experimental Jawi programming language
+41.4k Golang : Convert string to array/slice
+5.7k Linux/Unix/PHP : Restart PHP-FPM
+10k Golang : Test a slice of integers for odd and even numbers
+5.4k Gogland : Datasource explorer
+17k Golang : XML to JSON example
+4.6k Chrome : How to block socketloop.com links in Google SERP?
+21k Golang : For loop continue,break and range
+11.4k Android Studio : Create custom icons for your application example