[Resolved] How to Specify Extra Headers?

Discussion in 'Install/Configuration' started by Beginner, May 21, 2010.

  1. Beginner

    Beginner New Member

    One of the recommendations I get from Firebug for improving the overall performance of my sites is to specify a Vary: Accept-Encoding header.

    I've been looking in the online documentation and got the impression that this should be done in Context > Extra Headers, however... I am unable to locate that section in my admin console. (I did found something called Context under Virtual Hosts, but that appears to be something different.)

    Can you please tell me where I should look/how I should proceed? TIA!
    Last edited by a moderator: May 25, 2010
  2. NiteWave

    NiteWave Administrator

  3. Beginner

    Beginner New Member

    OK, so does that mean I should manually edit a particular file (rather than use the admin console)? If so, which file (and in which directory)? TIA for your help!
  4. NiteWave

    NiteWave Administrator

    admin console:
    Code:
    Server(or select one vhost)->General->Apache Style Configurations:
    Header add Vary Accept-Encoding
    
    or add to .htaccess
  5. Beginner

    Beginner New Member

    Thanks, that seems to have done the trick; i.e., when I check the server headers, I now see "Vary: Accept-Encoding" --however, Firebug still advises me to add the header to two resources (the HTML page itself and the CSS in an external file, but not the images on the page)... Do I need to take any additional steps, or is this perhaps just an issue with Firebug?
  6. Beginner

    Beginner New Member

    P.S.:

    I just checked the headers with another tool, which tells me that Vary: Accept-Encoding is being sent twice, so it looks like the header was already being sent --perhaps it is an issue with Firebug, then?!? :confused:
  7. NiteWave

    NiteWave Administrator

    i installed firebug 1.54 too. but haven't figured out how firebug advise me about header etc. can you tell the trick?

    also can you post a page's response headers showed in firebug?
  8. Beginner

    Beginner New Member

    This is what I do:

    1) Make sure that "Net" is enabled (click on the little arrow for a drop-down menu if necessary)
    2) Load a page, asking Firebug to show "All"
    3) Click on the "+" sign in front of an element for details on that element, including headers and caching information!
  9. Beginner

    Beginner New Member

  10. NiteWave

    NiteWave Administrator

    thanks for the detail. my question is
    Code:
    Firebug still advises me to add the header to two resources
    right, Firebug will show you all headers of a page. but how and where Firebug advise you to add which header ? :) same question for
    Last edited: May 22, 2010
  11. Beginner

    Beginner New Member

    Ah, now I see what you mean! ;)

    Actually, it is Page Speed that tells me to add the header --and I guess that's technically a Firebug plug-in/add-on, rather than part of FB proper... But once you have it installed, it "behaves" just like FB!
  12. NiteWave

    NiteWave Administrator

    installed Page Speed ... hmm, are the advice from Page Speed->Performance->Analyze Performance?

    Now I think I've got clear about this "Vary:Accept-Encoding" issue. It should be automatically added by litespeed when the page is compressed. please check the response header, if "Content-Encoding:gzip" is there. This is important for performance. Please post any 1 page's all response headers here for us to check it together.
  13. Beginner

    Beginner New Member

    The URL is: http://www.tafeltennis.org/

    Firebug Net shows the following headers:

    Content-Encoding gzip
    Vary Accept-Encoding
    Date Mon, 24 May 2010 11:33:42 GMT
    Accept-Ranges bytes
    Etag "1a7a-4bee99ba-f20186"
    Last-Modified Sat, 15 May 2010 12:55:22 GMT
    Content-Type text/html
    Content-Length 2898

    (So, yes, Content-Encoding: gzip is there, as is Vary: Accept-Encoding)

    Yet Page Speed says:

    Specify a Vary: Accept-Encoding header
    The following publicly cacheable, compressible resources should have a "Vary: Accept-Encoding" header:

    * http://www.tafeltennis.org/
    * http://www.tafeltennis.org/css.css

    As for css.css, Firebug Net shows the following headers:

    Date Mon, 24 May 2010 11:33:42 GMT
    Accept-Ranges bytes
    Connection Keep-Alive
    Keep-Alive timeout=5, max=100
    Etag "5fe-4bf7d363-f20185"
    Cache-Control max-age=2678400
    Expires Thu, 24 Jun 2010 11:33:42 GMT

    (I.e., no mention of Content-Encoding: gzip or Vary: Accept-Encoding here!)
  14. NiteWave

    NiteWave Administrator

    assume you installed Page Speed 1.7 or 1.8.1 beta?

    css.css in my firebug 1.5.4(Firefox 3.6.3) showed the 2 headers:"Content-Encoding: gzip" and "Vary: Accept-Encoding". and Page Speed no complain lack of Vary header etc.
  15. Beginner

    Beginner New Member

    Firebug 1.5.4 with Page Speed 1.8...

    I'm beginning to suspect the problem lies with Page Speed, since "Specify a Vary: Accept-Encoding header" is listed as a new rule/new feature on http://code.google.com/p/page-speed/wiki/ReleaseNotes and maybe there are a few buglets left... :p
  16. Beginner

    Beginner New Member

    Just a quick update that I thought might be useful: I've just installed Page Speed 1.8.2 and the issues I reported earlier have disappeared! (So it was a problem with Page Speed, not LiteSpeed! :cool: )

Share This Page