You are here: Re: how to mark php document as cachable (expires only when php file changes) « PHP Programming Language « IT news, forums, messages
Re: how to mark php document as cachable (expires only when php file changes)

Posted by News KF on 11/15/95 11:24

Hi Mike,


I'll dig into your details, but on a first glance your threeliner is
exactly what I imagined as solution.


bye



nkf


Michael Winter wrote:
> 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/>
>

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация