|
Posted by Alan J. Flavell on 11/01/90 11:28
On Tue, 4 Oct 2005, Stuart wrote:
> Bruno wrote:
> >
> > I have to use a flash file as an intro (customer requirements) with a
> > dropdown to select countries. After the user has selected a country, I
> > transfer to a frame page.
Sounds like the kind of site I'd never visit a second time, unless
there was some *really* compelling reason. From that description, it
seems it pushes most of my "run away, run away" buttons...
> > If I add or delete a file and refresh the page by F5 (IE), I will not see
> > the changes most of the time,
Is this about you, or about your users? Is it life-critical to your
users that they never get a page that's out of date by even a few
minutes?
If you're only trying to review your *own* updates, then surely the
clue is to use your browser to reload the new version. Don't nobble
the server just for your own convenience.
> >although I have these code of lines in the
> > header section:
> >
> > <meta http-equiv="expires" content="0">
> > <meta http-equiv="pragma" content="no-cache">
Don't do that, it's a "cure" that's far worse than the disease, and
anyway it doesn't (in general) work.
And, contrary to what seems to be popular superstition, when it works
at all, it acts on the HTML object which contains it, and not on the
images, flash files and other stuff to which that object links.
(Unless you happen to have found some browser-like object whose
response is even worse than normal, due to having to keep re-fetching
even the objects which never change...)
What I'd recommend is:
* Have a read of the principles set out in Mark Nottingham's tutorial
* Work out what you (or rather, the site's readers) *really* need in
terms of updates, versus cacheability => speed of response.
* Implement it...
http://www.mnot.net/cache_docs/
> You could try [Shift] - [F5], to force a refresh,
Yup, though the actual details of how to do that depend on the browser
used...
> or failing that you could try using the PHP 'header' command to put
> the Pragma: no-cache into the HTTP response. It may also be
> dependent on your server's settings.
You'd certainly be advised to put any cache-control statements into
the real HTTP header, and indeed PHP can do that, as you rightly say.
(But check what you're going to do for non-HTML objects too!).
However, "Pragma: no-cache" (an HTTP/1.0 kludge) is an unnecessarily
crude sledgehammer for achieving what's wanted here, at least with any
server version from this millennium.
I particularly recommend an occasional spin with Nottingham's
"cacheability engine", referenced in the above-mentioned tutorial.
good luck
Navigation:
[Reply to this message]
|