how can I force a browser to always load the newest version of index.htm when the page is loaded by entering the URL www.mydomain.com/index.htm or just www.mydomain.com in the browser's address field and pressing enter.
I'm trying this in Chrome and the newest version of index.htm is apparently only loaded, when I refresh manually (F5), or when the URL is already in the browser's address field and I press enter.
I guess I am doing something extremely stupid, because when I searched for the issue, all I could find were solutions about how to make a browser reload your .js and .css files by appending ?v=xxxx to the file names. But how should this work, if not even the newest version of index.htm page, in which I am doing these modifiactions, is loaded??
I also tried putting
<meta http-equiv="cache-control" content="no-cache">
in the <head>
of index.htm. But this does not seem to have any effect.
Any help would be greatly appreciated!
Thanks, Linus
In most web browsers you can force a one-time page load from the server by holding down the shift key while clicking on the Reload or Refresh button.
Ctrl + F5 is the shortcut to trigger a refresh, which will force the page to reload. To make the browser refresh without relying on the cache, use Shift + Ctrl + F5. This triggers a “hard refresh”, so the browser pulls up the newest version of a web page.
Clear the cache or force reload in the browser. Hit CTRL-F5 or CTRL-SHIFT-R in most modern browsers to force reload. Use the developer’s console to clear the cache. Do it programmatically. Change the file name of the script. Append a dummy timestamp to the source URL. Set an HTTP expires header to encourage browsers to reload the script.
In most modern browsers – Hold the CONTROL key ( COMMAND on a Mac), then click on the reload button. That’s it, this will force a full page reload from the server, not use anything from the local cache. The “common shortcut key” to do force-reload is either CONTROL-F5 or CONTORL-SHIFT-R. Now, the following is only for the Google Chrome browser.
Another possibility, however, is that the browser is loading the page from its cache rather than the server where the new file is sitting. If you are concerned about your web pages caching for your site's visitors, you can tell the web browser not to cache a page, or indicate how long the browser should cache the page.
BROWSER FULL RELOAD PAGE 1 In most modern browsers – Hold the CONTROL key ( COMMAND on a Mac), then click on the reload button. That’s it, this... 2 The “common shortcut key” to do force-reload is either CONTROL-F5 or CONTORL-SHIFT-R. More ...
OK, apparently no-cache was not enough. The following does the trick:
<meta http-equiv="cache-control" content="no-cache, must-revalidate, post-check=0, pre-check=0" /> <meta http-equiv="cache-control" content="max-age=0" /> <meta http-equiv="expires" content="0" /> <meta http-equiv="expires" content="Tue, 01 Jan 1980 1:00:00 GMT" /> <meta http-equiv="pragma" content="no-cache" />
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