I am trying to make my php-generated images cache. Here is a summary of the script with the headers. It doesn't seem to cache though. Do I need to do something special to make sure it caches?
[code=php]
//summarised
//resize...
$file= $_GET['file'];
$o= imagecreatefrom gif($file);
$i= imagecreatetrue color($w,$h);
imagecopyresamp led($i,$o,0,0,0 ,0,$w,$h,$wo,$h o);
//output
header('Content-type: image/gif');
header('Expires : '.date(DATE_RFC 1123,time()+259 2000));
imagegif($i);
imagedestroy($i );
[/code]
Here are the response headers (using firebug). The server clearly gets the expires header. But I still have the overhead showing in firebug.
Date Tue, 29 Jul 2008 13:06:36 GMT
Server Apache/2.0.55 (Ubuntu) PHP/5.1.2
X-Powered-By PHP/5.1.2
Expires Thu, 28 Aug 2008 14:06:36 BST
Content-Length 2182
Keep-Alive timeout=15, max=95
Connection Keep-Alive
Content-Type image/gif
[code=php]
//summarised
//resize...
$file= $_GET['file'];
$o= imagecreatefrom gif($file);
$i= imagecreatetrue color($w,$h);
imagecopyresamp led($i,$o,0,0,0 ,0,$w,$h,$wo,$h o);
//output
header('Content-type: image/gif');
header('Expires : '.date(DATE_RFC 1123,time()+259 2000));
imagegif($i);
imagedestroy($i );
[/code]
Here are the response headers (using firebug). The server clearly gets the expires header. But I still have the overhead showing in firebug.
Date Tue, 29 Jul 2008 13:06:36 GMT
Server Apache/2.0.55 (Ubuntu) PHP/5.1.2
X-Powered-By PHP/5.1.2
Expires Thu, 28 Aug 2008 14:06:36 BST
Content-Length 2182
Keep-Alive timeout=15, max=95
Connection Keep-Alive
Content-Type image/gif
Comment