To avoid cache control in firefox

2019-08-14 07:35发布

问题:

When the response header is

Cache-Control : no-store

Firefox stores in memory cache device.

If the response header is

Cache-Control : no-cache

then firefox stores in disk cache device.

If the response header is

Cache-Control : no-store, no-cache, must-revalidate, max-age=0, post-check=0, pre-check=0

then firefox stores in memory cache device

However firefox caching the request in any of one cache device. How to avoid that

回答1:

  1. try to set expire or max-age to minimum?
  2. another example: Cache-Control: "private, no-cache, no-cache=Set-Cookie, proxy-revalidate"
  3. also another way is to do like file.png?97887987979797 (not best...)
  4. another example from google: Cache-Control: "private, max-age=0" Expires: "-1"