Page headers (the ones sent before the html) - any tips or opinions?

Discussion in 'Search Engine Optimization' started by AdamSee, Jun 15, 2006.

  1. #1
    One of the features I feel is quite often overlooked in site construction and SEO is the response headers. Here you can drastically improve the speed of your page for return visitors by making sure they use the versions of the page they have on their computers if it hasn't been updated.

    To be able to edit the headers, you need to generate them through code before any HTML is sent e.g.
    	header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
    	header('Content-type: text/html; charset=UTF-8');
    Code (markup):
    or you can do it through your servers, although I've never done it that way before.

    Here is a typical page's response headers:

    
    Date: (time here)
    Server: (software here)
    X-Powered-By: PHP/4.4.2
    Keep-Alive: timeout=8, max=99
    Connection: Keep-Alive
    Transfer-Encoding: chunked
    Content-Type: text/html
    
    200 OK
    Code (markup):
    Things that I think maybe useful to add, that will increase speed and help search engines:

    
    Expires: (indicates the content is cacheable)
    Last-Modified: (The date it was actually last modified)
    Cache-Control: (things that must be obeyed by every caching agent)
    Pragma: (is used to include implementation- specific directives that might apply to any recipient along the request/response chain)
    
    
    Code (markup):
    I've noticed a lot of pages generate the 'last-modified' header field every time a page is loaded and while it may bring a lot of spiders back to the site initially, it doesn't let them know when something has really been updated. I don't know if that will affect anything, but I believe that if you were to keep your last-modified header to the actual time the site was last-edited, search engines may find it more favorable.

    I've not had much experience with page headers and can't find a lot of real-case documentation on them further than the specifications. So the question is, what do you use in your page headers?
     
    AdamSee, Jun 15, 2006 IP
  2. AdamSee

    AdamSee Well-Known Member

    Messages:
    422
    Likes Received:
    28
    Best Answers:
    0
    Trophy Points:
    135
    #2
    I guess this is more for the programmers. I'll try in a couple of days there if this gets no response.
     
    AdamSee, Jun 16, 2006 IP