Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I refresh a page with jQuery?

How can I refresh a page with jQuery?

like image 335
luca Avatar asked Mar 23 '11 11:03

luca


1 Answers

Use location.reload():

$('#something').click(function() {     location.reload(); }); 

The reload() function takes an optional parameter that can be set to true to force a reload from the server rather than the cache. The parameter defaults to false, so by default the page may reload from the browser's cache.

like image 166
Roy Avatar answered Oct 03 '22 07:10

Roy