Live data from Hacker News

Show HN: Where Adblock+ injects 20K CSS rules, HTTPSB injects one

github.com

41–50 of 183 posts

Re: Show HN: Where Adblock+ injects 20K CSS rules, HTTPSB injects one

#41

Could someone explain why Adblock injects CSS rules into the document? I presume it's to hide the ads, but what I don't understand is why that's the way it hides the ads. Why not simply remove the element containing the ad¹ instead? Additionally, presuming my earlier assumption is correct, if you hide the element with CSS, doesn't the browser still need to fetch the ad? ¹Get rid of as much crap ad HTML as possible. A…

Hiding elements is the safest way not to break the page layout.

It also doesn't cause the browser to reapply the CSS over the whole page, which it needs to do when markup changes.

Re: Show HN: Where Adblock+ injects 20K CSS rules, HTTPSB injects one

#42

Could someone explain why Adblock injects CSS rules into the document? I presume it's to hide the ads, but what I don't understand is why that's the way it hides the ads. Why not simply remove the element containing the ad¹ instead? Additionally, presuming my earlier assumption is correct, if you hide the element with CSS, doesn't the browser still need to fetch the ad? ¹Get rid of as much crap ad HTML as possible. A…

What other options do you see? Searching and manipulating DOM in JavaScript wouldn't be faster than a single CSS stylesheet. Remember that there are >20K rules in play.

Re: Show HN: Where Adblock+ injects 20K CSS rules, HTTPSB injects one

#43

Given that advertising pays for a lot of the services we all use, the use of Adblock and similar programs constitutes defection in game theory terms - the more people who do it, the worse off we all are - which means even if you choose to do it yourself (I personally don't), it is against your interests to encourage other people to do it. Also, given that computing is one of very few areas of technology in which our…

I suppose I cooperate: I use Ghostery, but not Adblock, because I see the point about ad income but do not see that it justifies tracking. It doesn't seem to make much difference in practice. Once you've eliminated the ads that involve too much tracking, there's little advertising left.

I'm not sure whether this is good or bad, and what it says about the advertising business.

Re: Show HN: Where Adblock+ injects 20K CSS rules, HTTPSB injects one

#44
post #31

Earlier quoted context omitted.

Chrome shows the memory consumption of plugin here : chrome://memory-redirect/ I don't think most users want pop-ups about technical details in browsers. Sublime text is a different story - it's meant for tech folks.

Plugin memory usage tracking is only realistically possible for Chrome where plugins run in a sandbox with a really limited API. Even then, if the plugin manages to allocate memory inside a page's sandbox (for example, by injecting some CSS or JS in there), the reporting will be wrong. The adblock plus problem is in fact one of those - it injects styles into pages in order to filter ads, which increases the memory fo…

Firefox is adding "add-on compartments" (bug 990729) that allocate separate memory arenas for each add-on. Firefox will be able to use this information to track (most) memory usage for each add-on.

https://bugzilla.mozilla.org/show_bug.cgi?id=990729

Re: Show HN: Where Adblock+ injects 20K CSS rules, HTTPSB injects one

#45
post #30

HTTPSB just isn't userfriendly enough for me. I run Adblock (not plus though) + Ghostery, and perhaps they use more memory and CPU, but if they do I've never noticed nor cared about it. Their userfriendliness is amazing though. HTTPSB randomly cripples sites, much like NoScript, and I really can't be bothered to deal with that anymore. With Adblock + Ghostery I feel completely in control. If I want to enable the Disq…

I think a lot of people get the opposite feeling. HTTPSB lets you see everything in the matrix and toggle what you want to show. If you want the carefree experience you can use this strategy[0] to unblock everything and only rely on the blocklists to which you subscribe. I currently use this method and I all I really want now is a block list for cookies (and one as good as Ghostery's list).

[0] https://github.com/gorhill/httpswitchboard/wiki/How-to-use-H...

Re: Show HN: Where Adblock+ injects 20K CSS rules, HTTPSB injects one

#46
post #31

Earlier quoted context omitted.

Chrome shows the memory consumption of plugin here : chrome://memory-redirect/ I don't think most users want pop-ups about technical details in browsers. Sublime text is a different story - it's meant for tech folks.

Plugin memory usage tracking is only realistically possible for Chrome where plugins run in a sandbox with a really limited API. Even then, if the plugin manages to allocate memory inside a page's sandbox (for example, by injecting some CSS or JS in there), the reporting will be wrong. The adblock plus problem is in fact one of those - it injects styles into pages in order to filter ads, which increases the memory fo…

Good point, I overlooked the 'injection' part.

Re: Show HN: Where Adblock+ injects 20K CSS rules, HTTPSB injects one

#47

Earlier quoted context omitted.

Plugin memory usage tracking is only realistically possible for Chrome where plugins run in a sandbox with a really limited API. Even then, if the plugin manages to allocate memory inside a page's sandbox (for example, by injecting some CSS or JS in there), the reporting will be wrong. The adblock plus problem is in fact one of those - it injects styles into pages in order to filter ads, which increases the memory fo…

Firefox is adding "add-on compartments" (bug 990729) that allocate separate memory arenas for each add-on. Firefox will be able to use this information to track (most) memory usage for each add-on. https://bugzilla.mozilla.org/show_bug.cgi?id=990729

It can already measure some parts of add-on memory usage, and you can see this by looking for "add-ons" in about:memory. Bug 990729 will improve the accuracy of the measurements.

Re: Show HN: Where Adblock+ injects 20K CSS rules, HTTPSB injects one

#48
post #30

HTTPSB just isn't userfriendly enough for me. I run Adblock (not plus though) + Ghostery, and perhaps they use more memory and CPU, but if they do I've never noticed nor cared about it. Their userfriendliness is amazing though. HTTPSB randomly cripples sites, much like NoScript, and I really can't be bothered to deal with that anymore. With Adblock + Ghostery I feel completely in control. If I want to enable the Disq…

I think a lot of people get the opposite feeling. HTTPSB lets you see everything in the matrix and toggle what you want to show. If you want the carefree experience you can use this strategy[0] to unblock everything and only rely on the blocklists to which you subscribe. I currently use this method and I all I really want now is a block list for cookies (and one as good as Ghostery's list). [0] https://github.com/gor…

But I don't want to use a strategy, I want to click a button and have adverts blocked.

Re: Show HN: Where Adblock+ injects 20K CSS rules, HTTPSB injects one

#49

Could someone explain why Adblock injects CSS rules into the document? I presume it's to hide the ads, but what I don't understand is why that's the way it hides the ads. Why not simply remove the element containing the ad¹ instead? Additionally, presuming my earlier assumption is correct, if you hide the element with CSS, doesn't the browser still need to fetch the ad? ¹Get rid of as much crap ad HTML as possible. A…

My understanding is that ADP removes elements wherever possible, and the CSS rules are there to catch the cases that remain. But that's about as far as my knowledge extends.

Re: Show HN: Where Adblock+ injects 20K CSS rules, HTTPSB injects one

#50

Given that advertising pays for a lot of the services we all use, the use of Adblock and similar programs constitutes defection in game theory terms - the more people who do it, the worse off we all are - which means even if you choose to do it yourself (I personally don't), it is against your interests to encourage other people to do it. Also, given that computing is one of very few areas of technology in which our…

Nope.

I'd like to live in a world with less advertising. Free services are of lesser concern. In terms of game theory it is absolutely, directly in my interest to promote systems that kill the effectiveness of blanket advertising and hopefully make it become a pointless exercise.

Post reply on HN