1

I make a GET request to www.mysite.com and in the header I receive:

Cache-Control   no-cache, no-store, must-revalidate
Expires Thu, 01 Jan 1970 00:00:00 GMT
Pragma  no-cache

Otherwise, I receive notification that some visitors do not see my site but an error occured last week and now fixed. Seems the error has been cached in their browsers and it is not doing a new request.

Can this be possible?

Ermal
  • 441
  • 5
  • 19

1 Answers1

0

I believe browsers (including IE) won't cache whole pages, and that DOM is reloaded after every request. This data is contained in the request after all.

Therefore, your visitors may still experience errors. Does your fix depends on resources like JS or CSS? In this case you may have caching issues.

ngasull
  • 4,206
  • 1
  • 22
  • 36
  • Don't have a way to check the fix type. Assuming that were a JS fix, the fact that I avoid caching on the client, this is not enough? Any idea how to do a workaround and make the clients load the updated files? – Ermal Mar 28 '13 at 17:01
  • There is a common trick to force resource reloading by using query parameters in your resource's URL. For example, if you have a version for your application, you can add a `?v=1.10.01` and check that this version changes each time you want to force reload. You also can use current date as the variable string there, for example, for URI `css/style.css?d=2013-03-28` would imply a force re-download every day. – ngasull Mar 28 '13 at 18:18
  • Thank you for the answer blint! I'm doing some tests in local and seems that with, `Cache-Control: no-cache, no-store, must-revalidate` changes in css/js files are visible in the browser. When I omit `Cache-Control: no-cache, no-store, must-revalidate` I must clear the cache (CTRL+SHIFT+F5) so the changes can take effect. Saying this, you think is necessary to use the approach using the parameter example, `?v=1.10.01`? Do you know why exactly is this happening, and why is not enough no-caching request parameters? Thank you very much in advance. – Ermal Mar 30 '13 at 21:14
  • Well I admit I never experienced request caching issues, the trick I gave you is useful to guarantee **resource** reloading only. You could have a look at [Microsoft IE's caching policy](http://support.microsoft.com/kb/234067) (`Expires = -1`?) and at [HTML meta tags](http://www.i18nguy.com/markup/metatags.html) for caching. Good luck, and please post here what solved your issue! – ngasull Apr 01 '13 at 19:57