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
+22.1k Golang : How to read JPG(JPEG), GIF and PNG files ?
+6.5k Golang : Humanize and Titleize functions
+20.1k Nginx + FastCGI + Go Setup.
+31.9k Golang : Math pow(the power of x^y) example
+4.4k JavaScript : Rounding number to decimal formats to display currency
+11.4k SSL : The certificate is not trusted because no issuer chain was provided
+9.2k Golang : Extract or copy items from map based on value
+6.5k Golang : Output or print out JSON stream/encoded data
+13.8k Golang : Google Drive API upload and rename example
+6.6k Android Studio : Hello World example
+14.9k Golang : Accurate and reliable decimal calculations
+5.3k PHP : Convert string to timestamp or datestamp before storing to database(MariaDB/MySQL)