On Wed, 21 Feb 2007, Shane McCarron wrote: > Okay - this is going to sound insane. Bear with me. > > It appears as if IE is always checking to see if images are up to date (at > least when the images are loaded via javascript or javascript-generated > HTML) - server round trips to get a "304" response. We happen to have some > pages that use a TON of images, and so there are lots and lots of server > round trips for no reason at all - the images never change. > > What I am wondering is if there is some clever way with a combination of a > mod_perl handler and maybe a dhandler to serve up images via Mason so I can > set the expires or cache-control headers in the hopes of tricking IE to stop > this nonsense. > > Obviously I could just set up a mason component that took an image name as > an argument and serve them up that way, but that is sort of inelegant. I > was hoping for a more transparent solution so I don't have to recraft all > the underlying code that is referencing these images.
I think you want an autohandler, rather than a dhandler. You'd probably want something like this: 1. Set Mason to process images too 2. In the autohandler, if it's an image, just add the header and pass to the next one, ensuring that you don't accidentally have any characters added by that module However, after a closer look at your description of the problem, what probably needs to happen is improved javascript coding practise. Something like loading the images into variables and then referring to them when needed, rather than whatever currently happens. If your a big enough organisation, you could also put a reverse Squid proxy in front of the whole thing, and then use the cache controls to tell it not to hit the web server very often. :) --------------------------------------------------------------------- | Name: Tim Nelson | Because the Creator is, | | E-mail: [EMAIL PROTECTED] | I am | --------------------------------------------------------------------- ----BEGIN GEEK CODE BLOCK---- Version 3.12 GCS d+++ s+: a- C++$ U+++$ P+++$ L+++ E- W+ N+ w--- V- PE(+) Y+>++ PGP->+++ R(+) !tv b++ DI++++ D G+ e++>++++ h! y- -----END GEEK CODE BLOCK----- ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Mason-users mailing list Mason-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mason-users