Αυτός ο ιστότοπος θα έχει περιορισμένη λειτουργικότητα, όσο εκτελούμε εργασίες συντήρησης για να βελτιώσουμε την εμπειρία σας. Αν ένα άρθρο δεν επιλύει το ζήτημά σας και θέλετε να κάνετε μια ερώτηση, η κοινότητα υποστήριξής μας είναι έτοιμη να σας βοηθήσει στο Twitter (@FirefoxSupport) και στο Reddit (/r/firefox).

Αναζήτηση στην υποστήριξη

Προσοχή στις απάτες! Δεν θα σας ζητήσουμε ποτέ να καλέσετε ή να στείλετε μήνυμα σε κάποιον αριθμό τηλεφώνου ή να μοιραστείτε προσωπικά δεδομένα. Αναφέρετε τυχόν ύποπτη δραστηριότητα μέσω της επιλογής «Αναφορά κατάχρησης».

Μάθετε περισσότερα

CSS caching with local websites

  • 3 απαντήσεις
  • 1 έχει αυτό το πρόβλημα
  • 55 προβολές
  • Τελευταία απάντηση από jscher2000 - Support Volunteer

more options

Has the behaviour of Firefox with regard to caching style sheets changed in the newest version?

I ask since I develop with Visual Studio and browse the development build with Firefox. Hence the URL will be similar to:

http://localhost:55223

If I modify a css file in the build and refresh the page in Firefox it does not change. It never changes even after a CTRL+F5, nor after starting a new session.

If I browse the site with Edge it does pick up the change instantly after tapping F5 to reload. To see the changes in Firefox it's necessary to rename the css file to force a reload of it.

This only seems to have started happening since the latest build and makes it impossible to use Firefox in the development environment. Is there a "hack" for the settings to force a reload?

Has the behaviour of Firefox with regard to caching style sheets changed in the newest version? I ask since I develop with Visual Studio and browse the development build with Firefox. Hence the URL will be similar to: http://localhost:55223 If I modify a css file in the build and refresh the page in Firefox it does not change. It never changes even after a CTRL+F5, nor after starting a new session. If I browse the site with Edge it does pick up the change instantly after tapping F5 to reload. To see the changes in Firefox it's necessary to rename the css file to force a reload of it. This only seems to have started happening since the latest build and makes it impossible to use Firefox in the development environment. Is there a "hack" for the settings to force a reload?

Επιλεγμένη λύση

Hi Mark, as another workaround, I created an extension you can use to temporarily prevent caching of CSS files from your own servers (or any servers, you create the host list and set the host permissions). Then you only need to use F5 and not Ctrl+F5.

(I'm 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.)

Ανάγνωση απάντησης σε πλαίσιο 👍 0

Όλες οι απαντήσεις (3)

more options

Hi markp1, caching has become more tenacious for pages on the web, but Ctrl+F5 still works on regular sites. I don't see why http://localhost:port/ would differ.

Another workaround is to block caching with this setting (this is equivalent to ticking the Disable Cache checkbox in the Network Monitor tool):

(1) In a new tab, type or paste about:config in the address bar and press Enter/Return. Click the button accepting the risk.

(2) In the search box in the page, type or paste cache and pause while the list is filtered

(3) Double-click the devtools.cache.disabled preference to switch the value from false to true

More info on about:config: Configuration Editor for Firefox.

more options

Hi!

Thanks for the reply. This doesn't work in itself e.g. F5 shows no change, however, CTRL + F5 does now force a refresh of the style sheets whereas before it did not.

I suspect this is a behavioural change related only to websites running on the local machine. However since I do a lot of development, this change is a problem. I'm going to downgrade the installation back to the last version which worked.

Thanks, Mark

more options

Επιλεγμένη λύση

Hi Mark, as another workaround, I created an extension you can use to temporarily prevent caching of CSS files from your own servers (or any servers, you create the host list and set the host permissions). Then you only need to use F5 and not Ctrl+F5.

(I'm 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.)