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
+4.9k Golang : How to pass data between controllers with JSON Web Token
+11.2k Golang : Read until certain character to break for loop
+6.4k PHP : How to handle URI or URL with non-ASCII characters such as Chinese/Japanese/Korean(CJK) ?
+19k Golang : How to make function callback or pass value from function as parameter?
+5.2k Golang : Display packages names during compilation
+9.2k Golang : Gonum standard normal random numbers example
+6.4k WARNING: UNPROTECTED PRIVATE KEY FILE! error message
+7.1k Golang : How to call function inside template with template.FuncMap
+12.2k Golang : Sort and reverse sort a slice of runes
+17k Golang : read gzipped http response
+3.5k Golang : Fix go-cron set time not working issue
+18.7k Golang : Send email with attachment