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
+11.8k Golang : Surveillance with web camera and OpenCV
+28.9k Get file path of temporary file in Go
+16.7k Golang : Get IP addresses of a domain name
+8.3k Golang : Randomize letters from a string example
+7.1k How to let Facebook Login button redirect to a particular URL ?
+11.5k Golang : Post data with url.Values{}
+5.5k Golang : Get FX sentiment from website example
+9.3k Golang : Get curl -I or head data from URL example
+8k Golang : Reverse a string with unicode
+14.7k Golang : Execute function at intervals or after some delay
+4.8k Linux : sudo yum updates not working