Last Modified Header - Spidering Frequency

Discussion in 'Site & Server Administration' started by Diamondbacks, Feb 21, 2005.

  1. #1
    In referrence to spidering frequency, it necessary or even beneficial to use a "Last Modified Header" with PHP pages?

    // always modified 
    header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); 
    PHP:
     
    Diamondbacks, Feb 21, 2005 IP
  2. rex_b

    rex_b Peon

    Messages:
    322
    Likes Received:
    23
    Best Answers:
    0
    Trophy Points:
    0
    #2
    I doubt it, but look forward to the responses.
     
    rex_b, Feb 21, 2005 IP
  3. J.D.

    J.D. Peon

    Messages:
    1,198
    Likes Received:
    65
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Content expiration is better controlled using such headers as Expires and Cache-Control. The HTTP spec says that HTTP caches may use Last-Modified for content expiration if no other information is available. In this case, the content may be considered valid for about 10% of the time interval between Last-Modified and the time the request was received by a cache.

    So, simply put, how Last-Modified is interpreted may be different from a crawler to a crawler. Considering the 10% suggestion, though, I would say that it may hurt more to have Last-Modified than not to if it's not accompanied by one of the expiration headers (i.e. Expires, Cache-Control, etc) because some caches may consider such responses as valid longer than one would expect.

    On the other hand, if the response doesn't have any expiration headers, caches are not supposed to keep such content longer than 24 hours (they may keep it longer, but have to accompany such content with a warning 113 after 24 hours).

    J.D.
     
    J.D., Feb 21, 2005 IP