חיפוש בתמיכה

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.

Learn More

Firefox seems to be ignoring my Cache-control directives

  • 1 תגובה
  • 4 have this problem
  • 2 views
  • תגובה אחרונה מאת Gingerbread Man

more options

As I understand it to prevent a page from being cached when using the https protocol you need to include the following directives in the header

<meta http-equiv="Cache-control" content="no-cache"> <meta http-equiv="Cache-control" content="no-store"> <meta http-equiv="Pragma" content="no-cache"> <meta http-equiv="Expires" content="0">

I did a test, creating two html files, one called uncached.html with these directives and another called cached.html without them.

I called both of them using https protocol and both appeared when I view the cache by typing in the URL about:cache.

I then exited Firefox, started it again and typed in about:cache and both urls were still there.

By way of comparison I tried it under IE. cached.html was cached, uncached.html was not.

In Chrome neither was cached. (when called using http instead of https both were cached.)

As I understand it to prevent a page from being cached when using the https protocol you need to include the following directives in the header <meta http-equiv="Cache-control" content="no-cache"> <meta http-equiv="Cache-control" content="no-store"> <meta http-equiv="Pragma" content="no-cache"> <meta http-equiv="Expires" content="0"> I did a test, creating two html files, one called uncached.html with these directives and another called cached.html without them. I called both of them using https protocol and both appeared when I view the cache by typing in the URL about:cache. I then exited Firefox, started it again and typed in about:cache and both urls were still there. By way of comparison I tried it under IE. cached.html was cached, uncached.html was not. In Chrome neither was cached. (when called using http instead of https both were cached.)

כל התגובות (1)

more options

You can try the code mentioned on the following page, but I doubt it'll work. There's an unresolved bug report dating back to 2003, a Mozillazine thread from 2007, and a support question from 2011. All point to meta tags having no effect on whether or not the page is cached.

If possible, use HTTP headers instead.