Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6557495
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T13:04:50+00:00 2026-05-25T13:04:50+00:00

http://developer.yahoo.com/performance/rules.html There it is given it is good to preflush the head tag .

  • 0

http://developer.yahoo.com/performance/rules.html

There it is given it is good to preflush the head tag .

But I have a question will it help while using gzip ? (I am using apache2).
I think full document will get gziped at one shot and then send to the client.

or is it also possible to have gzip as well as pre-flush the head tag

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T13:04:50+00:00Added an answer on May 25, 2026 at 1:04 pm

    EDITED

    The original version of this question suggested we were dealing with HTTP headers rather than the <head> section on an HTML document. I will leave my original answer below, but it actually has no relevance to this specific question.

    To answer the question about pre-flushing the <head> section of a document – while it would be possible to do this in combination with gzip, it is probably not possible without more granular control over the gzip process than Apache affords. It is possible to break a gzipped stream into chunks that can be decompressed on their own (see this) but if there is a way to control Apache’s gzip implementation to such a degree then I am not aware of it.

    Doing so would likely decrease the efficacy of the gzip, making the compressed size larger, and would only be worth doing when the <head> of a document was particularly large, say, greater than 10KB (this is a somewhat arbitrary value I arrived at by reading about how gzip works under the bonnet, and should definitely not be taken as gospel).


    Original answer, relating to the HTTP headers:

    Purely from the viewpoint of the HTTP protocol, rather than exactly how you would implement it on an Apache based server, I can’t see any reason why you can’t preflush the headers and also use gzip to compress the body. Keeping in mind that fact that the headers are never gzipped (if they were, how would the client know they had been?), the transfer encoding of the content should have no effect on when you send the headers.

    There are, however a couple of things to keep in mind:

    • Once the headers have been sent, you can’t change your mind about the transfer encoding. So if you send the headers which state that the body will be gzipped, then realise that your body is only 4 bytes, your would still have to gzip it anyway, which would actually increase the size of the body. This probably wouldn’t be a problem unless you were omitting the Content-Length: header which while possible, is bad practice as it means you cannot use persistent connections. This leads on to the next point…
    • You cannot send a Content-Length: header in this secenario. This is because you don’t know what the size of the body is until you have compressed it, by which time it is ready to send, so you are not really (from the server’s point of view) preflushing the headers, even if you do send them seperately before you start to send the body.
    • If it takes you a long time time to compress the body of the message (slow/heavily loaded server, very large body etc etc), and you don’t start the compression until after you have sent the headers, there is a risk the client may time out waiting for the rest of the response. This depends entirely on the client, but the are so many HTTP client implementations out there that this possibility cannot be totally discounted.

    In short, yes it is possible to do it, but there is no catch-all, “Yes, do it” or “No, don’t do it” answer – whether you would do it depends on each request and the nature of it’s response.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to set this expiration for weblogic, here is the description: http://developer.yahoo.com/performance/rules.html#expires http://code.google.com/speed/page-speed/docs/caching.html
http://developer.yahoo.com/javascript/howto-proxy.html Are there disadvantages to this technique? The advantage is obvious, that you can
I have some data similar to the following chart: http://developer.yahoo.com/yui/examples/charts/charts-seriescustomization_clean.html Only difference is that
I am currently using YUI datatable, but it is buggy: http://developer.yahoo.com/yui/datatable/ Is there another
i've just downloaded the Yahoo BOSS Mashup framework from http://developer.yahoo.com/search/boss/mashup.html , and I have
http://developer.yahoo.com/yui/docs/YAHOO.widget.DataTable.html Is it an event or something?
From http://developer.yahoo.com/yui/docs/YAHOO.util.DataSourceBase.html#method_sendRequest , you can see the oCallback is an object literal with the
For the following example: http://developer.yahoo.com/yui/examples/tabview/frommarkup_clean.html I would like to make the tabs right aligned
I am using YUI's datatable ( http://developer.yahoo.com/yui/datatable/ ) to make a table. But notice
I downloaded the swc file from here: http://developer.yahoo.com/maps/flash/flexGettingStarted.html And put it in my flex

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.