Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

After modifying a CSS file on my Apache server the browser does not seem to load the latest one until I hit Refresh on my browser. Opening the page normally by clicking the link or pressing enter in the address bar does not pull the updated CSS file. It is OK to refresh when developing, but this is a live server.

The HTML file that includes CSS has cache-control set to no-cache and the Apache server has default config.

Any pointers? Thank you

share|improve this question
it could be an ISP cache, or just firefox hiccuping. to make sure, if you have a *nix environment available, or you can get the win32 wget.exe, use it to download the css, but use the "--debug" switch to see who's doing the caching. if wget always pull updated files, then it's firefox's fault. – Waleed Hamra Mar 5 '12 at 20:25

Caching for the CSS is usually controlled by the Cache-Control header on the CSS file, not the HTML file. That's how you'd tell the browser to cache all your styling, but not the data, which sounds like what is happening here.

share|improve this answer

you can try to add this to your Apache config file :

<IfModule mod_headers.c>
<filesMatch "\\.(html|htm|css)$">
Header set Cache-Control: "no-cache, must-revalidate"

Note that you need to enable the mod_headers.

share|improve this answer

Your Answer


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.