note 50810 deleted from function.header by tularis

From: Date: Fri, 20 Apr 2007 14:57:05 +0000
Subject: note 50810 deleted from function.header by tularis
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-125672@lists.php.net to get a copy of this message
Note Submitter: fedenuche at gamail dot com ---- These headers only works with include, css, js, html, etc. But doesn't work with images files (jpg, gif, etc.) header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); header("Cache-Control: no-store, no-cache, must-revalidate"); header("Cache-Control: post-check=0, pre-check=0", false); header("Pragma: no-cache"); To no cache images you can use a trick: $var = md5(time()); $picture_name = "picture.jpg?var=".$var; picture.jpg is the name of the file that you don't want cache.

« previous php.notes (#125672) next »