homepage Welcome to WebmasterWorld Guest from 54.197.94.241
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Code, Content, and Presentation / Apache Web Server
Forum Library, Charter, Moderators: Ocean10000 & incrediBILL & phranque

Apache Web Server Forum

    
Change ExpiresByType for specific remote IP
phpmaven




msg:4239405
 7:02 pm on Dec 6, 2010 (gmt 0)

Is there any way to have Apache send different Expires headers to a specific remote IP address? I have people doing development on IE that upload images and them can't see the new version of the image unless they empty their cache.

Thanks,

Mark

 

jdMorgan




msg:4239571
 4:04 am on Dec 7, 2010 (gmt 0)

Not that I know of.

Your easy options seem to be:
1) Set the images to short expiry times, or mark them as must-revalidate, for the duration of the dev project.
2) Tell your developers to go into "Internet Options" and turn off browser caching (set the browser cache size or expiry to zero).

Option 1 will increase server load.
Option 2 is OK, but do remind your developers to turn their caching back on after testing, or *they* will suffer slow page-loading on all sites in the future.

A final option would be to rewrite all image URL requests to a script, and have that script open and serve the requested image files - along with the cache-control headers appropriate for the requesting client. This script might also have to handle generating a proper 404-Not Found response code for non-existent images, depending on how you code the rewrite.

All of the above assumes that you are already returning a proper Last-Modified timestamp for these image requests, but that IE is ignoring or mis-handling it (which wouldn't surprise me).

Jim

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / Apache Web Server
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved