|
Posted by Michael Winter on 11/04/14 11:24
On 18/08/2005 23:15, News KF wrote:
> I'm new to cahce control, [...]
The caching tutorial[1] by Mark Nottingham is well worth a read, but I
strongly suggest that you read RFC 2616, especially section 13, for more
detailed information. You will also want to read about the various
headers that can be involved in caching: Cache-Control (14.9), ETag
(14.19), Expires (14.21), conditional requests (14.24-6,8), and
Last-Modified (14.29).
[snip]
> So what exact header would I have to pass to indicate to make the
> browser understand, that the php file does not have to be refetched,
> except the php file (its creation date) changed.
You could send the Last-Modified header with a value reflecting the last
modified time of the PHP file:
header('Last-Modified: '
. gmdate('D, d M Y H:i:s', getlastmod())
. ' GMT');
Mike
[1] <URL:http://www.mnot.net/cache_docs/>
--
Michael Winter
Prefix subject with [News] before replying by e-mail.
Navigation:
[Reply to this message]
|