This seems like a good idea. The big question is whether the structure can recognize enough ads, and whether it will continue to do so. For example, if a site is using HTTP2 and all the ads come in over the same TCP connection, domain-based blocking may have a problem. If (when) CDNs start doing that, ad recognition becomes tougher.
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.
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.
I think this is actually an argument in favor of the declarative approach they are trying: The filter are all defined in terms of what the engine intends to do, rather of what actually happens low-level.
They gave an example of this with the "image" resource type: Whenever the engine loads an image (e.g., triggered by an <img src=...> declaration), those filters are triggered. It doesn't matter at all if the fetched resource actually has an image/... MIME type or not.
I could imagine the same thing working for HTTP2. The engine still knows which domain the request was initially for, even if all requests go to the same IP in the same connection in the end. Unless the filter says anything specific about the transport method, there is nothing stopping the engine from applying the existing filters to both HTTP and HTTP2. So domain-based blocking could actually become easier.
Comments
This seems like a good idea. The big question is whether the structure can recognize enough ads, and whether it will continue to do so. For example, if a site is using HTTP2 and all the ads come in over the same TCP connection, domain-based blocking may have a problem. If (when) CDNs start doing that, ad recognition becomes tougher.
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.
I think this is actually an argument in favor of the declarative approach they are trying: The filter are all defined in terms of what the engine intends to do, rather of what actually happens low-level.
They gave an example of this with the "image" resource type: Whenever the engine loads an image (e.g., triggered by an <img src=...> declaration), those filters are triggered. It doesn't matter at all if the fetched resource actually has an image/... MIME type or not.
I could imagine the same thing working for HTTP2. The engine still knows which domain the request was initially for, even if all requests go to the same IP in the same connection in the end. Unless the filter says anything specific about the transport method, there is nothing stopping the engine from applying the existing filters to both HTTP and HTTP2. So domain-based blocking could actually become easier.