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
+15.2k Golang : Test floating point numbers not-a-number and infinite example
+5.5k Unix/Linux : Use netstat to find out IP addresses served by your website server
+11.6k Golang : Transform comma separated string to slice example
+13.4k Golang : How to filter a map's elements for faster lookup
+7.5k PHP : How to parse ElasticSearch JSON ?
+7.1k Golang : Multiplexer with net/http and map
+8.4k Golang : Find correlation coefficient example
+61.5k Golang : Convert HTTP Response body to string
+7.4k Python : Fix SyntaxError: Non-ASCII character in file, but no encoding declared
+5.9k Golang : constant 20013 overflows byte error message
+19.3k PHP : Convert(cast) int to double/float
+26.9k Golang : Read, Write(Create) and Delete Cookie example