Reputation: 2174
Quick question, I was just checking my site on Nibbler and found that my site is not reporting anything under the Site Freshness, so took their advise and went ahead to check my response headers where I have discovered that I was not actually sending the Last Modified header in response.
I did ad the header last modified, but now left a bit confused about one simple thing, what date should be sent the date when content of the page has been modified or the date when coding was modified?
here is my header
header("Last-Modified: " . gmdate("D, d M Y H:i:s", strtotime($page_info['sitemap_last_modified'])) . " GMT");
It is handled by my index.php and sent before anything else.
The variable is the date of the page content modification.
Thanks in advance
Upvotes: 1
Views: 601
Reputation: 554
http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html
Section 14.29 "Last-Modified":
The exact meaning of this header field depends on the implementation of the origin server and the nature of the original resource. For files, it may be just the file system last-modified time. For entities with dynamically included parts, it may be the most recent of the set of last-modify times for its component parts.
It looks like it could be a lot more complex.
I would suggest going by your webserver and/or PHP's standard. Write a dummy echo file with a couple of images embedded, and look at the headers for the page itself, then change the PHP code a little and compare.
Upvotes: 2