Re: Problems with caching and headers.

From: Date: Tue, 11 Jul 2006 12:57:44 +0000
Subject: Re: Problems with caching and headers.
References: 1 2 3 4 5 6  Groups: php.general 
Request: Send a blank email to php-general+get-239311@lists.php.net to get a copy of this message
Mathijs wrote: ... >>> >>> Now i have a problem with the ETag. >> >> what are you using this header for? > > I Use this header to check if the content of a file has changed. > This because the content can be variable. But is static most of the time. > > I Compute an MD5 of the content, and add this to the ETag. > Normally a browser sends an HTTP_IF_NONE_MATCH back if it has an ETag. > If this gets send back, i compare them and if they are the same, they > get en 304 Not Modified back. > > Now Internet Explorer doesn't send this back when the content has been > compressed (gz_handler). > This because the Vary header has been set or something. > This is a bug in IE, and probably fixed in IE7. > freaking lightbulb moment for me!!! see how it pays to help people - you never know when you might get slapped in the face with some new knowledge :-) thanks! that said I wonder whether generating the dynamic content, buffering it, using the buffer to generate a md5 hash and then checking that is any faster than just outputting the generating content regardless? or is this purely a tactic to reduce bandwidth?

« previous php.general (#239311) next »