So the refresh should discard the cache, how to do it with jQuery?
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.
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.
Ctrl+F5 forces a complete refresh of a web page. It clears the cache and downloads all contents of the page again.
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.
No jQuery required, pure JavaScript:
location.reload(true);
documentation
See this article for a more in depth explanation.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With