Faqts : Computers : Programming : Shopping For You : PHP

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

76 of 84 people (90%) answered Yes
Recently 7 of 10 people (70%) answered Yes

Entry

Force PHP-created graphic to be fresh/not cached? How?

Feb 28th, 2007 02:33
Articles Way, Phlip, Mark,


Add the following headers to the php script:
header ("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); // Date in the past
header ("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); // 
always modified
header ("Cache-Control: no-cache, must-revalidate"); // for HTTP/1.1
header ("Pragma: no-cache"); // for HTTP/1.0
These will work for any PHP script, not just images.
========
pchighway.com/helpdesk/index.php?page=index_v2&id=4371&c=129
i hope that helps.
http://americanahost.com
http://www.qwesz.com