• Post Reply Bookmark Topic Watch Topic
  • New Topic

Apache Cache headers and 301  RSS feed

Varun Chopra
Ranch Hand
Posts: 213
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am facing a problem related to file caching on apache web server.
I have following header in config file:

But I also have some redirects after this. For e.g. for images I have following redirect:

When I check headers for an image, I am getting this:

I understand 301 is for redirect of image path and 200 OK is for image. Following lines of response above make it clear that server is sending future date of expiry to browser (IE 6 in this case).

Cache-Control: max-age=2592000
Expires: Sat, 03 Apr 2010 08:24:32 GMT

My question is "why does browser need to go to server at all when it knows it has image in the cache"? How can I prevent 301 calls and how do I know if browser is caching the image (is it considering Expires directive at all??)?

  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!