Reply to Re: HTTP question - file that never changes

Your name:

Reply:


Posted by Alan J. Flavell on 03/08/06 17:24

On Wed, 8 Mar 2006, Jim Higson wrote:

> I'm working on a server app, which makes resources with the creation
> time in the URL, so they are guarantied never to change once put up.
>
> Because the resource for a given URL never changes, browser cache is
> always safe to use and there is no need to revalidate. What are the
> best HTTP header(s) to use to indicate this, and how should they be
> set in Apache?

To the best of my knowledge, I'd say that setting an Expires header in
the distant future is all that it really needs. Apache will be
sending the usual cacheability data at the same time (unless you were
doing something to prevent that). Caches make their own decisions
about whether they're going to check or not. Trying to force them to
behave in one way or another, contrary to their inclinations based on
the actual properties of the page, seems to be rarely helpful, and
sometimes counterproductive. So unless you're a world expert in
Cache-control headers, I'd say you'd be safer to leave those out, than
to risk inadvertently saying the wrong thing.

Verify that you're getting the results that you intended, by pointing
Mark Nottingham's "cacheability engine" at some typical pages.

h t h

[Back to original 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

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