aspose file tools*
The moose likes Other Java Products and Servers and the fly likes Apache Cache headers and 301 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Products » Other Java Products and Servers
Bookmark "Apache Cache headers and 301" Watch "Apache Cache headers and 301" New topic
Author

Apache Cache headers and 301

Varun Chopra
Ranch Hand

Joined: Jul 10, 2008
Posts: 211
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??)?


-Varun -
(My Blog) - Online Certifications - Webner Solutions
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Apache Cache headers and 301