Posted by Andy Hassall on 10/07/06 10:22
On 6 Oct 2006 14:30:37 -0700, "Alexander Fischer" <happysmithers@hotmail.com>
wrote:
>Any suggestions on how I could make sure that also my PHP-created
>images will get cached the same way as static files?
There are various HTTP headers that control caching, such as Cache-Control and
Expires:
http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9
http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.21
If you've started a PHP session then PHP also sends headers to suppress
caching by default; you can override this though:
http://uk2.php.net/session_cache_limiter
Have a look at the headers being returned for your image (for example with the
Live HTTP Headers extension for Firefox, or Fiddler for Internet Explorer).
--
Andy Hassall :: andy@andyh.co.uk :: http://www.andyh.co.uk
http://www.andyhsoftware.co.uk/space :: disk and FTP usage analysis tool
[Back to original message]
|