indiansummersky has asked for the wisdom of the Perl Monks concerning the following question:

hi, wonder if anyone can help....

I'm trying to figure out how I control the caching of individual images on a webpage, vis-a-vis example 5 of http://www.simtec.ltd.uk/httpgallery/caching/. do I need to serve each image separately from perl to control its caching or is there a way of specifiying the caching control for any element on a page through the HTTP headers at the beginning?

...I know this is off topic, sorry...just wondering if anyone has any helpful hints or links...

Replies are listed 'Best First'.
Re: HTTP headers and such like
by friedo (Prior) on Nov 29, 2005 at 01:01 UTC
    I'm not sure what you mean by "serve each image separately from perl." You're aware that retrieving each image requires a separate request to the HTTP server, right?
Re: HTTP headers and such like
by sgifford (Prior) on Nov 29, 2005 at 03:06 UTC
    Your Web server should be able to give you reasonable control over caching without writing everything in Perl. Search through its documentation and see what you find. You'll want to set headers like Cache-control and Expires.