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.6k Java : Generate multiplication table example
+9.5k Golang : Scramble and unscramble text message by randomly replacing words
+24.1k Golang : Fix type interface{} has no field or no methods and type assertions example
+19.1k Golang : Padding data for encryption and un-padding data for decryption
+8.5k Golang : Convert word to its plural form example
+8.1k Golang : Grayscale Image
+22.3k Golang : Print leading(padding) zero or spaces in fmt.Printf?
+32.9k Golang : Regular Expression for alphanumeric and underscore
+7.9k Golang : Scan files for certain pattern and rename part of the files
+14.3k Golang : Convert IP version 6 address to integer or decimal number
+22.8k Golang : Strings to lowercase and uppercase example
+17k Golang : Read integer from file into array