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 : Get all local users and print out their home directory, description and group id
+13.4k Android Studio : Password input and reveal password example
+9.2k Golang : How to get garbage collection data?
+16.7k Golang : Get the IPv4 and IPv6 addresses for a specific network interface
+11.3k Golang : Delay or limit HTTP requests example
+12k Golang : Save webcamera frames to video file
+7.5k Golang : Convert(cast) io.Reader type to string
+12.2k Golang : How to display image file or expose CSS, JS files from localhost?
+7.2k Golang : Calculate how many weeks left to go in a given year
+11.4k Golang : Change date format to yyyy-mm-dd
+11.4k Swift : Convert (cast) Float to String
+15.9k Golang : How to reverse elements order in map ?