Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I simulate ctrl-F5 with jQuery?

So the refresh should discard the cache, how to do it with jQuery?

like image 286
new_perl Avatar asked Sep 27 '11 00:09

new_perl


People also ask

How do you click Ctrl F5?

Ctrl F5 (or Ctrl + F5) reloads the current page including the browser cache. It's called Hard reload. It means that the browser will not use the current cache but will be forced to download again all the files (js files, images, scripts, …). You will have the most fresh version of the page sent by the server.

What is the difference between F5 and Ctrl F5?

F5 reloads the page from server, but it uses the browser's cache for page elements like scripts, image, CSS stylesheets, etc, etc. But Ctrl + F5 , reloads the page from the server and also reloads its contents from server and doesn't use local cache at all.

What does Ctrl plus F5 do?

Ctrl+F5 forces a complete refresh of a web page. It clears the cache and downloads all contents of the page again.

What does clicking F5 do?

F5 is used to reload the current page you open. This action will also use the page cache that is previously loaded. This means that F5 will reload the same webpage, the cached one including the text, images, javascript files, and more in it.


1 Answers

No jQuery required, pure JavaScript:

location.reload(true);

documentation

See this article for a more in depth explanation.

like image 166
gilly3 Avatar answered Oct 19 '22 01:10

gilly3