This site will have limited functionality while we undergo maintenance to improve your experience. If an article doesn't solve your issue and you want to ask a question, we have our support community waiting to help you at @FirefoxSupport on Twitter and/r/firefox on Reddit.

Etsi tuesta

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Lue lisää

Firefox is ignoring cache-control directives

  • 2 vastausta
  • 111 henkilöllä on sama ongelma
  • 11 näyttöä
  • Viimeisin kirjoittaja Jamie Kitson

more options

Firefox is not respecting cache-control directives specified in response headers. Below is an example response generated by my application:

Server: Apache-Coyote/1.1 X-Powered-By: Servlet 2.4; JBoss-4.2.3.GA (build: SVNTag=JBoss_4_2_3_GA date=200807181417)/JBossWeb-2.0 Pragma: no-cache Cache-Control: no-cache Expires: Thu, 01 Jan 1970 00:00:00 GMT Content-Type: text/html;charset=ISO-8859-1 Transfer-Encoding: chunked Date: Fri, 25 Jun 2010 16:13:53 GMT

Despite the cache-control: no-cache, and the fact that the page has already expired, when the user navigates away, and then hits the back button, the page is re-displayed from cache. This causes subsequent navigation attempts to fail because the transaction identifiers are stale and have already been used.

This happened

Every time Firefox opened

Firefox is not respecting cache-control directives specified in response headers. Below is an example response generated by my application: Server: Apache-Coyote/1.1 X-Powered-By: Servlet 2.4; JBoss-4.2.3.GA (build: SVNTag=JBoss_4_2_3_GA date=200807181417)/JBossWeb-2.0 Pragma: no-cache Cache-Control: no-cache Expires: Thu, 01 Jan 1970 00:00:00 GMT Content-Type: text/html;charset=ISO-8859-1 Transfer-Encoding: chunked Date: Fri, 25 Jun 2010 16:13:53 GMT Despite the cache-control: no-cache, and the fact that the page has already expired, when the user navigates away, and then hits the back button, the page is re-displayed from cache. This causes subsequent navigation attempts to fail because the transaction identifiers are stale and have already been used. == This happened == Every time Firefox opened

Kaikki vastaukset (2)

more options

Firefox's cache mechanism doesn't have the same rules as an ordinary cache; in fact RFC 2616 suggests that it would be better to diverge in this sense. From RFC 2616 §13.13:

History mechanisms and caches are different. In particular history mechanisms SHOULD NOT try to show a semantically transparent view of the current state of a resource. Rather, a history mechanism is meant to show exactly what the user saw at the time when the resource was retrieved.

more options

I had a similar problem to you and eventually found the following:

Cache-control: no-cache
Cache-control: no-store
Pragma: no-cache
Expires: 0

http://www-archive.mozilla.org/projects/netlib/http/http-caching-faq.html

Muokattu , muokkaaja Jamie Kitson