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
+21.1k Golang : Sort and reverse sort a slice of strings
+10.1k Golang : Setting variable value with ldflags
+19.7k Golang : Set or Add HTTP Request Headers
+9.6k Golang : Validate IPv6 example
+11.1k How to test Facebook App on localhost ?
+26.7k Golang : Encrypt and decrypt data with AES crypto
+39.1k Golang : How to iterate over a []string(array)
+20.3k Golang : Reset or rewind io.Reader or io.Writer
+22.8k Golang : Set and Get HTTP request headers example
+6.9k Golang : Normalize email to prevent multiple signups example
+13.6k Facebook PHP getUser() returns 0
+15.9k Golang : Read a file line by line