Pretraži podršku

Izbjegni prevare podrške. Nikad te nećemo tražiti da nas nazoveš, da nam pošalješ telefonski broj ili da podijeliš osobne podatke. Prijavi sumnjive radnje pomoću opcije „Prijavi zlouporabu”.

Saznaj više

Firefox seems to be ignoring my Cache-control directives

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.)

Svi odgovori (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.