SPUG:CGI header question

Brian Hatch spug at ifokr.org
Thu Jun 19 12:06:33 CDT 2003



> Have a look at the headers the browsers are sending with their request.
> 
> There should be one named If-Modified-Since. You can compare this date
> with the modified date of your image and return a 304 (Not Modified)
> status code instead of 200. This will cause the browser to use the
> cached image.
> 
> Normally this happens automatically for images in the filesystem but you
> have to hand code it into CGI apps.

Of course, this still requires that the CGI is being run, and that it
queries the database to check the image timestamp.  It's less overhead
than actually grabbing and returning the image, but the browser still
needs to query the image each time, and the CGI must run each time.


--
Brian Hatch                  To strive, to seek, to find,
   Systems and               and not to yield.
   Security Engineer
http://www.ifokr.org/bri/

Every message PGP signed
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://mail.pm.org/pipermail/spug-list/attachments/20030619/9cc4430f/attachment.bin


More information about the spug-list mailing list