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.1k Golang : Create matrix with Gonum Matrix package example
+21k SSL : How to check if current certificate is sha1 or sha2
+13.6k Golang : syscall.Socket example
+7.8k Golang : Number guessing game with user input verification example
+6.2k Golang : How to validate ISBN?
+17.5k Golang : Convert IPv4 address to decimal number(base 10) or integer
+33.8k Golang : How to stream file to client(browser) or write to http.ResponseWriter?
+29.5k Golang : How to verify uploaded file is image or allowed file types
+13.4k Golang : convert rune to unicode hexadecimal value and back to rune character
+6.8k Golang : Example of custom handler for Gorilla's Path usage.
+5.9k PHP : Proper way to get UTF-8 character or string length
+4.8k Golang : The Tao of importing package