2

I'm currently tweaking the CSS layout for the printed version of my Blog. A huge problem with that is: FireFox caches the print CSS (the one with media="print") and does not reload it, so changes to it are not visible.

The usual CTRL+F5 does not work in the print-preview page and I don't want to clear the whole browser cache every time I updated my print CSS.

Any way to quickly see the changes to the print-CSS file?

1

2 Answers 2

0

Firefox extention to reload just the css..
https://addons.mozilla.org/en-us/firefox/addon/css-reloader/

4

Try to press: Ctrl+Shift+R or Ctrl+F5 on Windows, CMD+Shift+R on Mac. It will reload page, overriding the cache. This is sometimes called a “forced reload”.

See: Keyboard shortcuts - Perform common Firefox tasks quickly


According the letter of the HTTP caching specification, user agents should never cache URLs with query strings. While Internet Explorer and Firefox ignore this, Opera and Safari don’t

Troubleshooting:

  • Try to go to the CSS link directly and refresh it from there by using above key shortcuts.

  • Type about:config into the URL bar then find the entry titled network.http.use-cache. Set this to false.

  • You may also try to add at the end of the CSS URL question mark with something like '?a' or something else, browser will "think" it's a dynamic page and it'll force to reload it.

    E.g.:

    If you've access to the html, add question mark at then end of a URL.

    If you don't, try the following cache trick and check if that works:

    Load the main page at http://example.com/ which loads cached CSS file at http://example.com/print.css, so you can directly go to http://example.com/print.css?nocache by adding ?nocache at the end. Most of the web browsers should ignore their caches for any files which has question mark in the URL. Then try to reload the main page at http://example.com/ or http://example.com/?nocache

    Also check: What does the question mark at then end of a css include url do? and Is it the filename or the whole URL used as a key in browser caches?

  • The last method (as OP already mentioned) is to clear the cache by Ctrl+Shift+Backspace (or Ctrl+Shift+Delete, depending on your system).

  • Check: Force browser to refresh css, javascript, etc

12
  • On the current Firefox (26.0), Shift-F5 brings up the Profiler panel of the Web Developer tools, and Ctrl-Shift-F5 does nothing.
    – Stijn
    Commented Jan 27, 2014 at 13:48
  • Try: Ctrl+Shift+R instead.
    – kenorb
    Commented Jan 28, 2014 at 10:52
  • Crtl+Shift+R does not work in current version of Firefox (31.0) either. The only "native" solutions are to clear the cache in the Options->Advanced->Network configuration, or disable caching completetly in about:config->network.http.use-cache. Your other tricks do work as well.
    – Chris S
    Commented Aug 12, 2014 at 1:57
  • Alternative to Ctrl+Shift+R is Ctrl+F5, but double check, maybe you have some key shortcut conflicts.
    – kenorb
    Commented Aug 12, 2014 at 10:12
  • On a Mac, Command+Shift+R still works for me in Firefox 31. For Windows, both Ctrl+F5 and Ctrl+Shift+R are still listed too, @Chris.
    – Arjan
    Commented Aug 12, 2014 at 10:39

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .