Skip to content

Comment on Introduction to WebKit Content Blockersparent

Comments

Will two resources share the same tcp stream even if they are from different origins? I thought that each domain was given its own tcp stream in HTTP2. Is that even feasible to have a single tcp connection shared by multiple endpoints like that? I've read through some of the specs but not thoroughly enough to know for sure.

One concern I could see for browser based adblockers is the Server Push features of HTTP2, in which upon a client requesting a page, the server can deduce which subsequent requests a client will make (for example, if a client requests index.html, the server can assume that a request for styles.css and scripts.js will be coming shortly after) and 'push' them to client over the existing tcp stream without the client explicitly requesting them.

This could deprive an ablocker of the chance to deny content if I'm understanding it correctly. Then again, its very possible that I'm misunderstaning it. I should probably read the specification more thoroughly to answer some of my own questions.

The content could still be loaded, but not processed or rendered, perhaps?

This sucks because the user is still downloading the ads, and most likely paying for the bandwidth todo so.

I'm no HTTP2 expert, but I think clients can choose to opt-out of push or at least tell the server "I already got this document, please don't push it again."

Server operators are inclined to obey those hints, because otherwise they'd be wasting their own bandwith as well.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.