Re: More efficient thumbnail script

From: Date: Wed, 17 Jan 2007 00:15:34 +0000
Subject: Re: More efficient thumbnail script
References: 1 2 3 4 5  Groups: php.general 
Request: Send a blank email to php-general+get-247190@lists.php.net to get a copy of this message
Curt Zirzow wrote: > On 1/16/07, Jochem Maas <jochem@iamjochem.com> wrote: >> ... >> if ($cacheState) { >> $headers = getallheaders(); >> if (isset($headers['If-Modified-Since']) && >> ($headers['If-Modified-Since'] == $lastModified)) { > > I was waiting for this to be mentioned... > > I would use a more detailed approach: http://pastebin.ca/319054 could you clarify alittle? (beyond not using the apache specific getallheaders() function - I chose to go that route because I never run on anything other than apache) is the value of $headers['If-Modified-Since'] identical to $_SERVER['HTTP_IF_MODIFIED_SINCE'] or *can* they differ (i.e. would it be stupid to assume that apache 'normalized' the modidfied-since string?) is my code borked or merely not covering a number of edge cases related to older or more exotic browsers - my code does output 304 headers at the right time AFAIHT. but going by your code there could, it seems, be improvement ... i'd like to understand what exactly the improvement is (would be) about. tia & rgds, Jochem > > Curt.

« previous php.general (#247190) next »