Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- Page expiration problem
- Jure Erznoznik
August 3, 2005, 2:24 pm
rate this thread
I have written a small application in PHP. HTTP Server used is Apache 2.
PHP marks the pages it generates as non-cacheable which is problematic in
IE. If I press the Back button, IE will say that page has expired from cache
and I have to press the refresh button. Firefox does not have the same
To solve the problem, I modify the PHP headers so that page expiration is
set to 300 sec. This solves the above problem, but a new one appears:
IE will load the pages from cache which is of course bad since they contain
dynamic data (login information, database data).
Question: How do i make IE stop telling me the page has expired and
automatically reload instead?
Re: Page expiration problem
afterwards about how browsers are interpreting this.
"300 sec" sounds like a bad idea. It should either be cacheable for a
long session, or it should never be cached. The page where you _enter_
the password can be cached for ages, the responses after this point
maybe should never be. I doubt you'll ever find a single set of headers
that's appropriate to send on all your pages (but with PHP you can
easily change them on a per-page basis, even more easily than with ASP)
- Robert Frost-Bridges
August 3, 2005, 9:41 pm
- » how to vertical align a site to the center of the screen
- — Previous thread in » HTML Markup Language