0

How can I turn off browser caching for a specific website, so refreshing it with F5 works like refreshing it with ctrl + F5? I noticed that setting:

Cache-Control: no-cache

just doesn't work. And this caching spoils my website after hitting F5 because I'm not sure what it caches and there's a lot of dynamic actions there.

So there are two questions:

  • How do I turn off this caching?
  • How do I check what's being cached?
user2394156
  • 1,792
  • 4
  • 16
  • 33

2 Answers2

0

There's any research effort…… Here's your answer for perfect no-cached content using HTML:

<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />
<meta http-equiv="Pragma" content="no-cache" />
<meta http-equiv="Expires" content="0" />

==> from this post: https://stackoverflow.com/a/2068407/2213706.

And here's something about If-Modified-Since header:

==> https://stackoverflow.com/a/1192640/2213706

Community
  • 1
  • 1
Allan Stepps
  • 1,047
  • 1
  • 10
  • 23
  • Doesn't work. There's still diffirence between hitting F5 and ctrl+F5 on my website – user2394156 Jul 13 '13 at 09:23
  • Wait... I think it helped a little bit but still not fully. I mean now the website is displayed properly under Chrome but for example Firefox still makes problems. – user2394156 Jul 13 '13 at 09:26
  • How can I check what's being loaded from cache when entering a website in Firefox? – user2394156 Jul 13 '13 at 09:44
  • You can list the cache in recent browsers using "about:cache" in the navbar. It's raw, but you can know which elements are cached. ;-) – Allan Stepps Jul 14 '13 at 23:43
0

In the < head>

<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" />
<meta http-equiv="pragma" content="no-cache" />

OR Ctrl + shift + R

OR Ctrl + F5

OR Delete Cache from browser

OR Private Browsing

Daniel Díaz
  • 216
  • 4
  • 18