• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Rob Spoor
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Junilu Lacar
  • Tim Cooke
Saloon Keepers:
  • Tim Holloway
  • Piet Souris
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Frits Walraven
  • Himai Minh

Apache Cache headers and 301

 
Ranch Hand
Posts: 213
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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??)?

 
I will open the floodgates of his own worst nightmare! All in a tiny ad:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic