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.3k Responsive Google Adsense
+6.6k SSL : How to check if current certificate is sha1 or sha2 from command line
+9.8k Golang : Calculate Relative Strength Index(RSI) example
+11.6k Golang : Transform comma separated string to slice example
+12.6k Golang : Fix image: unknown format error
+13.1k Golang : Find network of an IP address
+13.6k Golang : Missing Bazaar command
+20.7k Golang : How to run Golang application such as web server in the background or as daemon?
+4.6k PHP : Convert string to timestamp or datestamp before storing to database(MariaDB/MySQL)
+18.8k Golang : Read directory content with os.Open
+4.9k Golang : Get Hokkien(福建话)/Min-nan(閩南語) Pronounciations