• Home
  • About
  • Contact
  • Archives
  • Blog Consulting
  • Domains for Sale

« Egonitron.com Reviewed by PimpMyPageRank
Increase Your Alexa Rank with a Redirect URL »

The Truth About the Firefox “Pipelining” Trick

Published May 25th, 2007 in Firefox and Hacks. 34 Comments
-->

If you’re reading this blog, you probably use Firefox (77% of you, according to my analytics) and have possibly heard about the “pipelining” trick to speed up browsing. But does it really work? Yes…yes it does. But let me show you the right way to use it.

pipeliningIf you aren’t familiar with the trick, it claims to speed up your browsing in Firefox by opening up multiple “pipes,” allowing you to make multiple http requests to a web server, each pipe downloading a different part of the web page, then assembling them correctly at your browser.

Normally, HTTP requests are issued sequentially, with the next request being issued only after the response to the current request has been completely received. Depending on network latencies and bandwidth limitations, this can result in a significant delay before the next request is seen by the server.

HTTP/1.1 allows multiple HTTP requests to be written out to a socket together without waiting for the corresponding responses. The requestor then waits for the responses to arrive in the order in which they were requested. The act of pipelining the requests can result in a dramatic improvement in page loading times, especially over high latency connections.

The Problem

There’s really nothing wrong with the hack if done correctly. The problem lies in the (mis)communication of how to implement it. Most blogs you read are going to tell you to set the “network.http.pipelining.maxrequests” value to some huge number like 30, so you can make 30 http requests at once (I’ll let you know what that means later in the post, keep reading.) This is why that’s ridiculous:

  • Firefox only has the ability to send 8 requests at once, so altering this value to anything higher than 8 is pointless. Will it hurt anything if you set it that high? No, but it just shows you that the people who told you to do this don’t know what they’re doing.
  • Even if it could send 30 http requests at once, you wouldn’t want to set it that high. If everyone made 30 simultaneous http requests to every web server they connected with, the internet would be slow, webmasters would hate you (and Mozilla,) and your IP would probably be banned from many websites. There is a reason that this setting is turned off by default.
  • The higher you set this value, the more likely it is that you will break something. But don’t fret about it.

That being said, I love this feature, and use it to it’s fullest. I suggest you do the same, if it works well for you.

The correct way to use the Pipelining feature

Note: You must have a (preferably fast) broadband connection. If you have dial-up, stop reading, forget it, pipelining isn’t for you.

Also, if you don’t use Firefox, please download it. You won’t regret it:

In normal Microsoft fashion, Internet Explorer doesn’t support pipelining (even IE7)

  1. Open a new tab in Firefox (Ctrl+T) and type “about:config” (without the quotes) in your address bar.
  2. In the “Filter:” search box, type “network.http” (again, without the quotes.) You don’t have to hit enter.
    • Look for the “network.http.keep-alive” setting and make sure it’s set to “true”. If it’s “false,” double-click that line and it will change to true.
    • On the same page, look for “network.http.version” and make sure it’s set to “1.1″
  3. Now clear out the Filter box and type in “pipelining”
    • Look for “network.http.pipelining” Right-click on that line, and click on “toggle” and be sure the value is set to “true” (or double-click to toggle values.)
    • If you’re on a proxy, look for “network.http.proxy.pipelining” Right-click on that line, and click on “toggle” and be sure the value is set to “true”. If you don’t know if you’re on a proxy or not, just set it to “true” anyway. It won’t hurt anything.
    • Lastly, look for “network.http.pipelining.maxrequests” Right-click on that line, click on “modify” and set the value to 8. You can set it anywhere between 1 and 8. If you notice your internet is acting weird after this, try decreasing this value.
  4. Keep in mind that this may not agree with some web servers, and therefore break the webpage. I have not personally experienced this yet, but this feature is still in testing, and that’s why it’s not set to “true” by default.

There you have it. Ignore the sites telling you to set the value to “30.” Those same pages will also tell you to create a new value called “nglayout.initialpaint.delay” and to set that value to “0″. All this does is start displaying the information on the webpage sooner. nglayout.initialpaint.delay does not make your page load faster. In fact, it can make it load slower; especially on slower connections. If you create this value and set it to “0″ you will notice the page beginning to render right away, but it will take longer to finish completely.

The final word

There are many little hacks in Firefox that you can perform, and I plan on covering many of them in future posts. The Mozilla guys have done a great job in making Firefox fast, and most of the time you will be happy with the default settings. But not all computers are the same, and they can’t predict that. There is a reason that many of these settings are set the way they are by default, and you should only change them if you know what the value actually does. Don’t listen to someone who says “change this random value in about:config, it will make your pages load faster” without explaining to you what the value actually does. That setting may work great for him, but may not work well for you.

Anybody have anything to add?

Subscribe to RSS

34 Responses to “The Truth About the Firefox “Pipelining” Trick”

Feed for this Entry

  1. 1 skierpage May 27th, 2007 at 3:20 pm

    I thought Mozilla and MSIE by default issued up to 4 requests at once. Years ago that’s what my Web performance monitor simulated, and it’s the default for network.http.pipelining.maxrequests in current Minefield.

    http://support.microsoft.com/kb/183110 talks about tweaking MaxConnectionsPerServer settings for MSIE, and says it’s 4 for HTTP 1.0 servers and 2 for HTTP 1.1 servers.

    I can’t remember if browsers make multiple simultaneous requests to different servers, I think they used to. That was one motivation for companies to have images.bigco.com as well as http://www.bigco.com.

    Keep-alive is important so the browser can issue the requests in a single TCP/IP conversation. It requires server cooperation to hold open the channel on the other end, and many sites get it wrong.

    Back in the day when everyone was on dial-up, sites would work to optimize performance. Not so much these days.

  2. 2 Mordwin May 29th, 2007 at 4:31 am

    I think you’re talking about browsers creating multiple connections to a web server (typically 2 these days as you say), whereas this is about issuing multiple requests to a single connection (or connections).

    Without pipelining, you’d get 2 connections and a request issued on each, then the browser waits for the replies. When it gets a reply on a connection, it can then issue the next request (and with keep-alive, hopefully not have to re-establish the connection).

    With pipelining it can issue up to 8 requests per connection all at once, then simply wait for the responses to come back in the order they were issued before issueing a new batch of (up to) 8.

    That’s my understanding anyway :)

  3. 3 Randy Bryan Jun 3rd, 2007 at 12:13 am

    Helpful article. I just applied the tweak. We’ll see how it goes. I’ve added this article to my blog carnival at: http://techloaf.com/index.php?.....ition.html

    In the future, I hope you can submit more articles to my blog carnival.

    Thanks!
    Randy

  4. 4 Keith Jun 8th, 2007 at 10:35 pm

    Interesting. I remember when pipelining was introduced into Mozilla many many years ago. It sounded great, but I’ve never read articles telling you to use it (in fact, the articles I’ve read have said the opposite).

    I was under the impression that pipelining opened a connection and didn’t close that connection until everything was downloaded, so that it wouldn’t have to reconnect to the server for every request. I guess I misunderstood. Thanks for the clarification.

    Bummer about the dial-up. Ironically, it’s us bumpkins that are stuck with dial-up that need faster page downloading the most :( I guess tabs are still the best gift to us.

  5. 5 Gustavo Rondina Jun 26th, 2007 at 1:18 am

    Thanks for the article, very interesting. I didn’t know this feature, and I’ll sure test it carefuly.

    The first impression I had was very good. Websites are indeed reloading a bit faster here (I’m through a 2mbps link), and so far I have not faced any problem with a particular site.

  6. 6 egon Jun 26th, 2007 at 1:24 am

    Good luck everyone, please let us know if you have any issues.

  7. 7 Strobo Aug 13th, 2007 at 12:01 pm

    dug it!

  8. 8 OknooRap Aug 13th, 2007 at 3:05 pm

    Hi all, I am newbie here.

  9. 9 egon Aug 13th, 2007 at 4:17 pm

    Welcome OknooRap, I look forward to seeing your future opinions.

  10. 10 Ram Niwas Sep 7th, 2007 at 8:19 pm

    Good feature it’ll definetly work for you….
    as it did for me.

  11. 11 lunatic lex Nov 1st, 2007 at 4:28 pm

    I had just learned about this from a friend and tried with the 30 number, and was having issues. Then I found your info, it is much better than what I’ve already found, and explains the idea better. Made the changes, and now I’m moving along quite nicely!

    THANKS !!

  12. 12 egon Nov 1st, 2007 at 9:08 pm

    Glad I could help Lex!

  13. 13 Mikz Jan 22nd, 2008 at 10:48 am

    Thanks for the explanation…I tried 8 but the webpages I usually visit took longer to response and I kept getting “Your connection was Reset” huh?!? Anyway I tone it down to 5 or 6 and see if it works better.

    -M

  14. 14 egon Jan 22nd, 2008 at 10:56 am

    Mikz, yes it seems like it’s hit & miss with some connections. Be sure to keep us updated.

  15. 15 Cyborg Feb 8th, 2008 at 11:16 am

    I’ve found that the pipelining method really increases speed for sites hosted by free webhosts (especially my own). I haven’t seen a speed increase for other sites.

  16. 16 inhahe Apr 24th, 2008 at 3:19 am

    Pipelining isn’t about opening multiple simultaneous connections to the webserver; it’s about sending multiple requests in a single connection (and possibly even a single packet) without waiting for response for each one.

    The frustrating thing is that it’s hardly ever used because *some* webservers which pretend to support HTTP 1.1 don’t support pipelining, even though they’re *required* to according to the HTTP 1.1 spec (browsers aren’t required to, only servers), and since it’s supposed to be assumed that they support it, there’s no good way to tell whether one does or not, so browsers like FireFox tend to play it safe and a) disable pipelining by default, and b) use heuristics to determine whether to use it when it’s enabled.

    Wikipedia says that most webservers support it, and as the only exceptions lists a couple of versions of IIS. So I’m thinking maybe we can thank Microsoft for doing things their own way as usual – whatever’s convenient for them – thus preventing web browsing from becoming much faster and more efficient for everyone.

    I suppose it would have been better if they had anticipated that some people (like Microsoft) would screw it up and made pipelining optional and included a spec to indicate whether it’s supported in the http header. But I guess hindsight’s 20/20.

  17. 17 BarryW May 22nd, 2008 at 5:30 am

    Just moved from FF 2.0.0.14 to 3.0 RC1 – it’s very fast even without the pipelining tweak.

    Enabled pipelining and works very well with most websites except banking sites it seems.

    Suggest you try logging into your bank account with pipelining enabled to see what happens.

    My bank site jams up with pipelining enabled so I’ve gone back to the default mode.

    The rendering speed of FF 3.0 should help the speed freaks – currently 10x faster than IE7.

  18. 18 parviziyi Jun 5th, 2008 at 7:08 pm

    When I enabled pipelining in Firefox there was no perceptable improvement in speed. I think the improvement must be small, if it exists. Anybody claiming to report “The Truth About the Firefox Pipelining Trick” must state how much faster downloads are with the pipelining enabled and this report doesn’t do so. For the man to crow “I love this feature, and use it to it’s fullest” without quantifying what difference it makes, sounds like snake oil salesmanship to me.

  19. 19 egon Jun 5th, 2008 at 7:37 pm

    Thanks for the comment parviziyi. The problem with Pipelining is that it’s so dependent on so many factors, some people see a big difference, and some see nothing.

    Personally, the difference I’ve seen was minimal, but there none-the-less.

    Of course, there is also the possibility of the placebo effect on a lot of people as well, and that’s fine too.

  20. 20 inhahe Jun 5th, 2008 at 7:43 pm

    It only improves speed noticeably in certain situations. If you have to download many small files from a website (and it supports pipelining for that server), it will improve the speed drastically. After I enabled pipelining loading pages of thumbnails in MySpace or DeviantArt was shockingly faster.

  21. 21 jon Jun 9th, 2008 at 9:21 am

    I enabled pipelining a while back.
    Over time I noticed that some graphics sites, with thumbnails, weren’t loading properly – - many thumbnails wouldn’t load, unless I refreshed a couple of times.
    If I switched to IE, everything would load normally.
    So, one day the light bulb went off, and I disabled pipelining. And voila, all thumbnails now load normally.
    I’ve tried adjusting the number, even down to 2, but some thumbnails still wouldn’t load.
    I don’t know why this happens, but now I have pipelining disabled… and all’s well.

  22. 22 schatten Jun 18th, 2008 at 8:22 am

    Seems a little bit faster. I am using FF 3, didn’t notice a great difference yet, but may I will see it soon. Keep on testing it.

  23. 23 Joe Jun 22nd, 2008 at 9:35 am

    I am setting my pipeline value to 60. Will that possibly further enhance the browser speed on Firefox 3?

  24. 24 Joe Jun 26th, 2008 at 9:41 am

    I don’t know what all the hype is about, but I tried FF3 on my computer and it’s not as fast as expected. When I recently upgraded Internet Explorer 7 to IE7 PRO (you could call it Internet Explorer 7.5), it now loads pages as fast as FF3, has many of the FF features, and downloads faster. I am now enjoying IE7 PRO better than FF3.

  25. 25 Daniel Jul 27th, 2008 at 9:00 pm

    Wow luckly i read your article because the nglayout.initialpaint.delay that i had set to 0 was slowing down the websites from full load. I booted that and its super fast. Thanks

  26. 26 Richard Bello Aug 16th, 2008 at 3:26 pm

    O god… I am so sick of people all over the internet writing articles, and making videos tutorials with incorrect info about the network.http.pipelining.maxrequests hack…

    ——————
    12 year old who knows nothing about computers writes: “Hey…What if i set it to a high number like 100?

    Idiot who copied and pasted the tutorial from another idiot writes: Wow IDK, i should try that, It would be super fast!

    12 year old writes back: I am such 1337 hacker.
    ——————-

    I so happy to finally get this info from someone who knows what they are talking about… Thanks

  27. 27 egon Aug 16th, 2008 at 6:16 pm

    Glad I could help Richard :) I’m all too familiar with the situation you provided.

  28. 28 Matt Aug 29th, 2008 at 3:08 pm

    I just tried this using Google image searches. Without pipelining, the pages loaded in an average of about 2.75 seconds. With pipelining, the average was about 2.25 seconds. Subjectively, the delay before the first image loaded seemed about the same, but the delay between the first image loaded and all images were loaded seemed much shorter.

  29. 29 Frank Nov 29th, 2008 at 3:13 am

    I changed as you directed and websites are loading much more faster than normal

    Thanks for this article i will add it to my blog once its ready

  30. 30 az Dec 2nd, 2008 at 8:12 am

    @jon, and whoever has the same problem: You probably have a high-bandwidth application open at the same time (P2P or several HTTP downloads or whatever). Disabling network.http.keep-alive does the trick. It seems that a packet missing due to TCP throttling may block a connection, and with pipelining that means that up to 8 requests will not be resent until the connection times out.

    Also, keep in mind that the speedup by pipelining is roughly proportional to bandwith * latency

  1. 1 TechLoaf.blog Trackback on Jun 2nd, 2007 at 11:42 pm
  2. 2 Schneller surfen mit Firefox durch “Pipelinening” at NetReaper - Andersmensch Pingback on Apr 20th, 2008 at 9:32 am
  3. 3 Navegadors (I) default « Ubunmaqueando Pingback on Apr 21st, 2008 at 3:11 pm
  4. 4 The Morningstarr* - Open firefox faster Pingback on Jun 17th, 2008 at 2:27 am
Comments are currently closed.

Subscribe

Enter your email address:

Categories

  • Affiliate
  • Blogging
  • Business
  • Content
  • Contests
  • Design
  • Events
  • Evil
  • Firefox
  • Funny
  • Google
  • Graphics
  • Hacks
  • Internet
  • IT
  • Marketing
  • Merchandise
  • Misc
  • Money
  • Movies
  • Security
  • SEO
  • Social Networking
  • Software
  • Sponsored Post
  • Tools
  • Video
  • Webmaster
  • Wordpress

Antispam

We Love Egonitron


RSS Entries and RSS Comments