Forum Moderators: phranque

Message Too Old, No Replies

Last modified header date for dynamic pages

Last modified header date for dynamic pages

         

Whitey

12:26 am on Mar 16, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



We set the last modified date to be one hour after the time it was served to save on bandwidth.

Because our dynamic content changes each time a page is served [ even the same one ], we show the last modified date updated on every visit.

How does this look? Did we miss anything important?

Last-Modified: Tue, 07 Mar 2006 01:03:43 GMT

httpd headers:

[xyz.com...]

GET /xyz.com_dev.css HTTP/1.1
Host: xyz.com
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.12)
Gecko/20050915 Firefox/1.0.7
Accept: text/css,*/*;q=0.1
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive
Referer: [xyz.com...]
Pragma: no-cache
Cache-Control: no-cache

HTTP/1.x 200 OK
Date: Wed, 15 Mar 2006 23:34:09 GMT
Server: Apache
Last-Modified: Tue, 07 Mar 2006 01:03:43 GMT
Etag: "4beae-369c-440cdbef"
Accept-Ranges: bytes
Content-Length: 13980
Keep-Alive: timeout=15, max=99
Connection: Keep-Alive
Content-Type: text/css

jdMorgan

2:00 am on Mar 16, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I'm not sure what the question is here. But I'd suggest suppressing Last-Modified, and just using the Expires header, set for an hour or two after the current client request.

See Apache mod_expires.

Jim

Whitey

2:28 am on Mar 16, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



I'm just clarifying if we have covered everything.

Why would you use " See Apache mod_expires " in preference to "last modified"?

jdMorgan

2:37 am on Mar 16, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I recommend that you see (review) Apache mod_expires because it seems more in line with what you are trying to do:

[httpd.apache.org...]

This module controls the setting of the Expires HTTP header in server responses. The expiration date can set to be relative to either the time the source file was last modified, or to the time of the client access.

The Expires HTTP header is an instruction to the client about the document's validity and persistence. If cached, the document may be fetched from the cache rather than from the source until this time has passed. After that, the cache copy is considered "expired" and invalid, and a new copy must be obtained from the source.

Jim