Hacker News new | ask | show | jobs
by Animats 4269 days ago
You can probably get a comparable, if not greater, improvement in performance by using ad and tracker blocking. Most of those extra TCP streams opened when displaying a web page are for ads and trackers. Those are the ones opening a TCP connection to send their one-pixel GIF.
1 comments

A modern web browser will not block page loading when making a request for an image, though. I don't think blocking ads will necessarily improve perceptible page load time, though obviously it will reduce network traffic.

This does not apply for ad code that's implemented as <script src="..."></script>, which will indeed block page loading.

Try it, the change can be dramatic. Ads have a lot of JS these days.
>Ads have a lot of JS these days.

A lot of the ad JS I see is in the form of inline script tags, which generally should not block anything (the JS usually asynchronously constructs another script tag, which shouldn't impact performance).

>Try it, the change can be dramatic.

I've been using AdBlock Plus, and now uBlock, for at least 8 years. So I'm definitely not arguing against it.

It's just that in theory, an ad tracker (like a 1 pixel image) does not necessarily have to impact performance. Also note that some ad blockers add performance overhead themselves.

>A lot of the ad JS I see is in the form of inline script tags, which generally should not block anything (the JS usually asynchronously constructs another script tag, which shouldn't impact performance).

Well, it does impact performance, even if it's async. The pipe is only a finite width (especially on mobile).