0

I constantly update my homepage with new details, and founded out that unfortunately I can not observe these changes by simply reloading the page, and I should use Ctrl-F5 (cache refresh).

Is there any way, like a line of code to put in the source, in order to make my homepage reload completely when the page is refreshed, without pressing Ctrl-F5?

user215721
  • 289
  • 2
  • 10

1 Answers1

0

If you can alter the HTTP headers sent with your homepage, do the following:

Cache-Control: no-cache, no-store, must-revalidate
Pragma: no-cache
Expires: 0

See here for more info.

If you can't, try the following in your HTML document:

<meta http-equiv="Cache-Control" content="no-store" />
<meta http-equiv="cache-control" content="max-age=0" />
<meta http-equiv="cache-control" content="no-cache" />
<meta http-equiv="expires" content="0" />
<meta http-equiv="expires" content="Tue, 01 Jan 1980 1:00:00 GMT" />

This won't work on most proxy caches, and it may not work on some browsers. More info here.

Community
  • 1
  • 1
Craig S. Anderson
  • 6,150
  • 4
  • 27
  • 42