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

I'm using the following header on a php page.

 // Prevent page caching.
 header('Expires: Tue, 20 Oct 1981 05:00:00 GMT'); 
 header('Cache-Control: no-store, no-cache, must-revalidate'); 
 header('Cache-Control: post-check=0, pre-check=0', FALSE); 
 header('Pragma: no-cache');

I'm also using a rand=999999999 (with a real random number) in the URLs.

But pages are still being cached. Reload works, but first load is cached. Anyone know where I can change this?

share|improve this question

migrated from Sep 21 '10 at 21:17

This question came from our site for computer enthusiasts and power users.

You send a duplicate "Cache-Control" header. Try removing the second one.

share|improve this answer

Check NGINX settings. Might be there something like

proxy_ignore_headers  "Cache-Control" "Expires";
share|improve this answer

Your Answer


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