Hilfe durchsuchen

Vorsicht vor Support-Betrug: Wir fordern Sie niemals auf, eine Nummer anzurufen, sie per SMS zu kontaktieren oder persönliche Daten preiszugeben. Bitte melden Sie verdächtige Aktivitäten über die Funktion „Missbrauch melden“.

Learn More

Firefox loading pages from cache after latest update

  • 2 Antworten
  • 2 haben dieses Problem
  • 31 Aufrufe
  • Letzte Antwort von jscher2000

more options

I do web design. And my problem is that I used to click the refresh button in firefox and it would instantly load an updated version of the pages I was working on. But now it does the exact same thing I hate about chrome. It loads pages using cached css and javascript files. And the only way to view the updated websites is to go private mode which is very annoying. Is there an option to get around this? Or it's a software problem?

Ausgewählte Lösung

Hi Oleg, Firefox should revalidate cached script files when you use F5/the Reload button/Ctrl+R, but in Firefox 79+, it definitely will not routinely check for updates to cached CSS files before expiration. I agree this is similar to Chrome, based on a test page I built here to compare the two: https://www.jeffersonscher.com/csscache/

So your workaround options include:

(A) On your server, disable caching of .css files

Only practical for development servers, not production servers. However, this would bypass the issue for all browsers you need to test in.

(B) In Firefox, disable caching during development

  • While Dev Tools are open: There is a checkbox for this in the Network Monitor tool. The corresponding preference in about:config is devtools.cache.disabled (double-click to toggle).
  • Completely: In about:config, look for browser.cache.disk.enable and browser.cache.memory.enable (double-click to toggle).

(C) When reloading, bypass the cache

This doesn't require any configuration changes, but there's an extra finger (key) involved each time. Either:

  • Shift+click the Reload button
  • Ctrl+F5
  • Ctrl+Shift+R (seems a bit less reliable than the other two methods)

New workaround as of Sept. 22:

(D) Use an extension to disable caching of .css files from relevant servers

I created an extension that applies cache-control: no-store to text/css responses from hosts you specify:

(Still trying to figure out a good user interface for managing addition and removal of host permissions. Hopefully Firefox will have a native one at some point.)

Diese Antwort im Kontext lesen 👍 1

Alle Antworten (2)

more options

Ausgewählte Lösung

Hi Oleg, Firefox should revalidate cached script files when you use F5/the Reload button/Ctrl+R, but in Firefox 79+, it definitely will not routinely check for updates to cached CSS files before expiration. I agree this is similar to Chrome, based on a test page I built here to compare the two: https://www.jeffersonscher.com/csscache/

So your workaround options include:

(A) On your server, disable caching of .css files

Only practical for development servers, not production servers. However, this would bypass the issue for all browsers you need to test in.

(B) In Firefox, disable caching during development

  • While Dev Tools are open: There is a checkbox for this in the Network Monitor tool. The corresponding preference in about:config is devtools.cache.disabled (double-click to toggle).
  • Completely: In about:config, look for browser.cache.disk.enable and browser.cache.memory.enable (double-click to toggle).

(C) When reloading, bypass the cache

This doesn't require any configuration changes, but there's an extra finger (key) involved each time. Either:

  • Shift+click the Reload button
  • Ctrl+F5
  • Ctrl+Shift+R (seems a bit less reliable than the other two methods)

New workaround as of Sept. 22:

(D) Use an extension to disable caching of .css files from relevant servers

I created an extension that applies cache-control: no-store to text/css responses from hosts you specify:

(Still trying to figure out a good user interface for managing addition and removal of host permissions. Hopefully Firefox will have a native one at some point.)

Geändert am von jscher2000

Hilfreich?

more options

I did end up creating an extension:

https://addons.mozilla.org/firefox/addon/no-cache-no-store-for-css/

It applies cache-control: no-store to text/css responses from hosts you specify. That prevents caching, so they are re-retrieved for a plain F5 or Ctrl+r.

Hilfreich?

Stellen Sie eine Frage

Sie müssen sich mit Ihrem Benutzerkonto anmelden, um auf Beiträge zu antworten. Bitte stellen Sie eine neue Frage, wenn Sie noch kein Benutzerkonto haben.