[phplib] Caching problems with MSIE From: Peter H. Lemieux (phl <email protected>)
Date: 09/06/00

>From time to time, there have been discussions here (and elsewhere!)
about problems with MS Internet Explorer caching pages despite the best
efforts of all concerned to force the page to be refreshed.

After my 9999th experience with this problem, I did yet another search
at support.microsoft.com and found this document:

  http://support.microsoft.com/support/kb/articles/Q234/0/67.ASP

which includes the following rather remarkable statements:

1) MSIE 4/5 ignores all cache-control headers that are sent via
<meta http-equiv> tags.

This doesn't matter for PHPLIB which uses the PHP header() function to
send the headers, but it certainly matters for developers seeking to use
meta tags to control caching.

2) MSIE *only* recognizes an "Expires: -1" HTTP header as indicating
that a page should be expired immediately.

This conflicts directly with the HTTP/1.1 spec
(http://www.cis.ohio-state.edu/htbin/rfc/rfc2068.html), which states in
section 14.21:

   To mark a response as "already expired," an origin server should use
   an Expires date that is equal to the Date header value. (See the
   rules for expiration calculations in section 13.2.4.)

Assuming (stupidly, it appears) that one should follow the HTTP spec to
implement expiration, I tried the approach of sending identical dates
for the Date: and Expires: headers via meta tags. Didn't work at all
with MSIE. I haven't tried this using the header() function because....

I changed the entries for the Expires header to send a "-1" instead of a
valid date. MSIE now no longer caches the page, nor does Netscape. I
propose this as a bug fix to the current PHPLIB code.

Peter H. Lemieux, President
CYWAYS, Incorporated
phl <email protected>

---------------------------------------------------------------------
To unsubscribe, e-mail: phplib-unsubscribe <email protected>
For additional commands, e-mail: phplib-help <email protected>