I have a website which maintenance I've inherited, which is a big hairy mess.
One of the things I'm doing is improving performance. Among other things, I'm adding Expires
headers to images.
Now, there are some images that are served through a PHP file, and I notice that they do have the Expires
header, but they also get loaded every time.
Looking at Response Headers, I see this:
Expires Wed, 15 Jun 2011 18:11:55 GMT
Cache-Control no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma no-cache
Which obviously explains the problem.
Now, I've looked all over the code base, and it doesn't say "pragma" anywhere. .htaccess doesn't seem to have anything related either.
Any ideas what could be setting those "pragma" (and "cache-control") headers, and how can I avoid it?
The culprit may be php.ini, where session.cache_limiter=nocache. Change the value to blank or public to avoid the anti-cacheing headers.