Chrome disobeying cache-control max-age=3600 header and always serving from cache

285 views
Skip to first unread message

Ivan Jouikov

unread,
Nov 8, 2017, 2:24:25 AM11/8/17
to Chromium-discuss
Hello,

We've observed this behavior where we have a meta tag in the head of our index HTML page with

cache-control max-age=3600

...with intention to cache it for an hour.

However, it's been our experience that Chrome 62 (Windows & Mac) will disregard this tag and ALWAYS serve the page from cache. Furthermore, the dev tools will not be clear about this:


...note that some files below are shown as "(from disk cache)", but this file admin-dev.html is not, but server and fiddler logs confirm that the request for it is never made and it is in fact served from cache.

This happens whether using bookmark or copy-pasting URL. Refreshing the tab would clear the cache and get the updated version.

Here are the headers shown for this request; what's interesting is that it appears the "Response Headers" are cached, because they are showing "Date" of about a week ago, when the file was last accessed and cached:

    1. Request URL:
    2. Request Method:
      GET
    3. Status Code:
      200 OK
    4. Remote Address:
    5. Referrer Policy:
      no-referrer-when-downgrade
  1. Response Headersview source
    1. Content-Length:
      40174
    2. Content-Type:
      text/html; charset=utf-8
    3. Date:
      Wed, 01 Nov 2017 16:39:08 GMT
    4. Last-Modified:
      Mon, 28 Aug 2017 13:00:06 GMT
    5. Server:
      nginx/1.9.5
  2. Request Headers
    1. Provisional headers are shown
    2. Upgrade-Insecure-Requests:
      1
    3. User-Agent:
      Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.75 Safari/537.36

Adam Rice

unread,
Nov 8, 2017, 10:14:51 AM11/8/17
to Chromium-discuss
I am not aware of any functionality in Chrome to obey cache-control directives in HTML meta tags. As far as know it only obeys them in the HTTP headers.

Does it behave differently in other browsers? If you believe there is a bug in Chrome you should file an issue at http://crbug.com/.

--
--
Chromium Discussion mailing list: chromium...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-discuss


Reply all
Reply to author
Forward
0 new messages