Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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?

share|improve this question
    
Firefox extention to reload just the css.. addons.mozilla.org/en-us/firefox/addon/css-reloader –  tao Jul 27 '12 at 2:11
    
@tao that seems to work. Add it as an answer and I'll accept it. –  Lukas Knuth Jul 27 '12 at 17:58

2 Answers 2

up vote 0 down vote accepted

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

share|improve this answer

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

share|improve this answer
    
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 Jan 27 at 13:48
    
Try: Ctrl+Shift+R instead. –  kenorb Jan 28 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 Aug 12 at 1:57
    
Alternative to Ctrl+Shift+R is Ctrl+F5, but double check, maybe you have some key shortcut conflicts. –  kenorb Aug 12 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 Aug 12 at 10:39

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.