11 ms·
Show HN: Where Adblock+ injects 20K CSS rules, HTTPSB injects one
- sillysaurus3 12y agoAdblock+ has been fine for me. Has anyone had any problems? Personally, Adblock+ has earned my trust over a long period of time, so it's hard to see myself switching to something else unless the reason was dire.
- batiudrami 12y agoThis is a response to an article[1] on memory use, and specifically a bug/limitation of ABP which causes it to use large amounts of memory (1GB+) on web pages which utilise many iframes. [1] https://blog.mozilla.org/nnethercote/2014/05/14/adblock-pluss-effect-on-firefoxs-memory-usage/ https://blog.mozilla.org/nnethercote/2014/05/14/adblock-plus...
- mkesper 12y agoTrusting Adblock is hard because of the "acceptable ads" feature. https://en.wikipedia.org/wiki/Adblock_Plus#Controversy_over_ad_filtering_and_ad_whitelisting https://en.wikipedia.org/wiki/Adblock_Plus#Controversy_over_...
- zorbo 12y agoAs far as I know (anybody please correct me if I'm wrong on any of this), it's Adblock PLUS that can't be trusted. Adblock (without the plus) is a completely separate project that's much more trustworthy. Adblock PLUS basically usurped Adblock by appending a "plus", making it seem like it's somehow better than Adblock.
- Spittie 12y agoIt's not like that. A long time ago (2005?) there was an extension for Firefox called "Adblock". Eventually the development of this extension died, and it got forked with the name "Adblock Plus" in 2006 or so. The Adblock you're referring to (the Chrome-only extension, right?) was published in 2009. As you can see, Adblock Plus predates it by 3 years or so.
- zorbo 12y agoGood to know, thanks for the correction.
- harkyns_castle 12y agoI shifted to using Adblock Edge [1] after that. I got a good chuckle out of the term 'acceptable ads' though. https://addons.mozilla.org/en-US/firefox/addon/adblock-edge/ https://addons.mozilla.org/en-US/firefox/addon/adblock-edge/
- fernandotakai 12y agoyou can use adblock edge [0] -- it's a fork without the whitelist for ads [0] https://addons.mozilla.org/en-US/firefox/addon/adblock-edge/ https://addons.mozilla.org/en-US/firefox/addon/adblock-edge/
- gorhill 12y agoYou don't have to switch. The code is GPLv3, rather modular, and if they decline to import it, the idea behind it can be easily implemented.
- acjohnson55 12y agoMy biggest problem is the memory usage. I use a lot of tabs at once, and I'm regularly finding myself swapping on an 8GB MBP.
- rmccue 12y agoIs there any plan to port this to Firefox? It'd be nice to see HTTPSB as an alternative to ABP there too.
- JetSpiegel 12y agohttps://github.com/gorhill/httpswitchboard/issues/86 https://github.com/gorhill/httpswitchboard/issues/86
- forrestthewoods 12y agoI rage quit Firefox years ago because it's impossible to discuss it's critical perf issues without people pointing shifting blame to plugins. It got so bad I ran clean installs that never had a plugin ever, still had perf issues, and people on the internet simply refused Firefox could be at fault. I switched to Chrome and have never looked back. I also have never had a single issue with any AdBlock plugin in Chrome. Maybe they're doing something insanely stupid. I don't know. I use Chrome where it just works so I also don't care.
- goochtek 12y agoI was in your situation. I switched from Firefox to Chrome and thought I would never go back. Funnily enough, I went back recently (a few months ago) and have really been enjoying the recent Firefox editions. Sure, they make some "interesting" design choices, but overall I believe it's really improved recently. You should really give it another shot.
- sliverstorm 12y agoIt's the memory gluttony that really puts a cramp in Chrome's style. I can't always afford to run it.
- jwilliams 12y agoI run Chrome as my general browser and Firefox for development. So I use both in anger every day. I must say that FF has caught up, plus it feels like Chrome is starting to fall behind -- I regularly get lockups in Chrome (particularly GMail) and FF has made great strides. To the point that I might flip and use FF for my everyday work too.
- ksec 12y agoExactly right. Everything is comparative. If Chrome never appeared in the first place, Firefox may well still reign supreme. The problem is Chrome first appeared so god damn fast, and has better caching, advance / pre DNS lookup, rendering and responsiveness, startup speed etc. Firefox looked the IE of its days. Then Firefox did improve, ( at its own pace ) and Chrome manage to slip behind in multiple areas. But i really wanted a third choice, WebKit based Browser that is Firefox Like ( Tab OverFlow. ) Or may be i should just buy a Mac.
- Walkman 12y agoMY GOSH! I never realized how slow my page loadings were. Removed ABP (and a couple of extensions) after reading this and the memory consumption just went to 1/2 of what it used to be, the page loading times are just incredible... I always wondered why Chrome is soooo much slower compared to Firefox (ABP not installed on Firefox) but never investigated further. Thank you so much!
- enscr 12y agoWhenever I opened a new tab & typed something in the address bar, it appeared after a 1-2 second delay. I used to think that was absurd on part of Chrome. However after removing ABP, the problem's gone. That 20K number makes me cringe. For now, a little bit of ads are fine :)
- pkulak 12y agoI'm a big fan of Privoxy. Just get that stuff out of the browser entirely.
- jrabone 12y agoYep. I run Privoxy and a DNS resolver configured to be authoritative for the worst 5000 or so ad farms. Zips along nicely, and works for every machine on the LAN or via remote VPN. Fuck ads. Find a different business model.
- boobsbr 12y agoInteresting, in my experience, FF was always slower than Chrome.
- anigbrowl 12y agoI have not had any significant problems with ABP, but after trying out HTTPSB earlier this week it's become my most essential extension. It's not as user-friendly as Ghostery, ABP and a few others, but I really appreciate its ability to quickly show me what's actually happening on a given page. I would love to see it develop into a general-purpose diagnostic tool. After only having it installed for a few days, it's hard to imagine life without it - which is about the highest compliment I can give.
- e1g 12y agoSame - I installed HTTPSB as a dec tool, but ended up liking how much control it gives back to me about what is loaded on my pages. There was an initial period of frustration as I had to unblock the bare minimum required to make youtube/gmail/vimeo/facebook work as expected, and after that it's smooth sailing. ADP is gone, and I feel like I get my pages quicker and cleaner.
- rwallace 12y agoGiven 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 species is still making substantial progress, and that progress is driven by market demand, even if you want to make your workload computationally cheaper for yourself, it is very much against your interests to encourage other people to follow suit; if every web browser starts using less memory, everyone is worse off. I'm not going to start trying to persuade you personally to cooperate rather than defect - that's a value judgment you have to make - but please at least appreciate that it's a bad idea to encourage other people to defect!
- givan 12y agoPeople will pay for things that they will really need, advertising/freemium is used for all the things that we don't really need.
- reedlaw 12y agoWhy not encourage people to pay for services they use and enjoy? The ad-supported services have mixed motives at best and tend to compromise on privacy when it affects their bottom-line. Also, there are other reasons for blocking ads besides simple annoyance. They tend to be hosted by 3rd party domains that can track browsing history across sites.
- rwallace 12y agoMicro-payments are a bad idea because making decisions costs mental energy, and the energy cost declines more slowly than the amount, so if you have to decide to pay a couple of cents to read an article, you end up spending more than a couple of cents worth of mental energy making the decision. It's a dead loss. Advertising is a better business model all around.
- raesene3 12y ago
- baal80spam 12y agoDear god... Why haven't I found this plugin before? This is pure awesomeness - makes up for lack of NoScript for Chrome... I can finally disable ABP and Disconnect - ever since I used them, my web experience in general felt definitely more sluggish. Thanks!
- Sarkie 12y agoThe thing with all these plugins, I shouldn't care as a user, I should be informed about these issues. If you use http://www.sublimetext.com/ http://www.sublimetext.com/ you will get a dialog when scripts are running slow, as in, "Script XYZ took more than 1 second to process this file, you can disable it" All I want in FF or Chrome is the same. "Adblock blocked the UI for 4 seconds" "Adblock increased memory consumption by double" Or they could even be more harsh and kill plugins that take too long and impact user experience like the Flash timeout.
- enscr 12y agoChrome 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.
- kevingadd 12y agoPlugin 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 footprint of the page. So neither Firefox nor Chrome can tell you 'adblock plus is increasing memory usage by X', because the memory usage is hidden along with everything else owned by the page, not by the addon.
- cpeterso 12y agoFirefox 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 https://bugzilla.mozilla.org/show_bug.cgi?id=990729
- nnethercote 12y ago
- deleted 12y ago[deleted]
- phaed 12y agoPrepare for the huge spike of user adoption. This is just incredible, never knew this existed. Super useful.
- zorbo 12y agoHTTPSB 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 Disqus script on a single page for a single session, Ghostery easily lets me do that. HTTPSB makes that hard, or perhaps I'm missing something. Case in point: When I tried to post this comment, I got a "Dead link: users don't match" error which went away when I disabled HTTPSB.
- jzelinskie 12y agoI 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-HTTP-Switchboard:-Two-opposing-views#the-allow-allblock-exceptionally-approach https://github.com/gorhill/httpswitchboard/wiki/How-to-use-H...
- deathanatos 12y agoCould 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. Ads seem to come layered in all manner of divs and iframes.
- Drakim 12y agoRemoving the ad from the DOM might cause JavaScript errors that fudges up the site. By making the element invisible it's still "there".
- seszett 12y agoHiding 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.
- lauriswtf 12y agoWhat 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.
- drdaeman 12y ago20K rules probably isn't that big, when you compile that to an automata. Most nodes are probably behind the edges that never traversed. If there would be an option for a extension to hook into DOM element creation (i.e. when browser parses HTML and builds a tree, it'd call some user-defined predicate function) - that would possibly solve the issue. I believe CSS is slow because of cascading nature - it requires re-compiling it from the very plaintext source on every page view, to combine ad-blocking rules with others - this certainly could be optimized (if browser side would provide tools for that). No idea about horrendous memory usage, though.
- nnethercote 12y ago
- guelo 12y agoNot sure how a Chrome-only plugin is supposed to help with Firefox memory consumption.
- pritambaral 12y agoBy setting an example of how element-hiding blocklists should be implemented
- gorhill 12y agoIt's a problem specific to ABP (both in Firefox and Chrome). I posted links to the (GPLv3) javascript code at the end of the article, and explained that it is rather modular, i.e. easy to import and adapt.
- randunel 12y agoThe only reason I'm using an ad blocker is because of Youtube's ads. I think the whole marketing industry took a big hit when Google introduced ads to Youtube, because lots of people were forced to install the ad blockers. All of my friends use ABP now......
- AndrewDucker 12y agoOkay, so how can we get the ABP people to do likewise? I'd love to see a reaction from them explaining either why they can't do it, why it wouldn't help, or when they're planning on doing it...
- notfoss 12y agoWladimir Palant(ABP dev) gives a short response here: https://adblockplus.org/blog/on-the-adblock-plus-memory-consumption#c005360 https://adblockplus.org/blog/on-the-adblock-plus-memory-cons...
- drdaeman 12y agoApples and oranges. ABP filters out (or, more correctly, modifies by styling them to not display) DOM elements, HTTPSB filters out HTTP requests. That's two completely different approaches, each with its own pros and cons, but neither is a real replacement for the other one (although both apples and oranges are suitable for eating). On an unrelated note, a fun approach to fix ABP would be to introduce non-cascading style sheets, possibly with limited styling capabilities, specifically for adblocking. Those could be well-precompiled and run extremly fast while taking much less memory. But that would require hacking browser internals, so that's not gonna happen.
- bikamonki 12y agoWhy bother installing an ad blocker if your brain already has an ad ignorer plugin? Furthermore, this ad ignorer software is quite good at learning: the advertirzers may shift place and shape but it will only fool you once, or none. Hence the need of massive user bases on 'free' online services, because only a tiny percentage of brains fall for the ads and even a tinier chunk of these clickers turn into buyers.
- maratc 12y agoI solve the issue with a (free) OpenDNS account where everything in the (crowd-sourced) "Advertisers" list is just resolved to 127.0.0.1. This works for phones, tablets, and any browser on any OS in my home network. The problem is what to do once I leave my home network.
- laurent123456 12y agoTo reduce the number of filters in Adblock, a simple way is to let it run for a few days with a popular black list such as EasyList. Then open the list in the preferences, sort it by number of hits, and unselect all the filters with 0 hits (there are so many of them, that probably something like 99% of them never get any hits). You can select the filters, and press "Space" to disable them all in one go.
- D9u 12y agoWith AdBlock+ and HTTPSB you still get the network traffic from unwanted sites. AdSuck, from the good folks at Conformal, blocks unwanted connections and thus decreases unwanted network traffic. https://github.com/conformal/adsuck https://github.com/conformal/adsuck
- antiufo 12y agoAs a temporary workaround for AdBlock (and for Firefox since it's not supported by HTTPSB), here's EasyList stripped out of all its CSS rules. It obviously lets some banners slip through, but most of them are still blocked. http://www.xamasoft.com/adblock/easylist-nocssrules.txt http://www.xamasoft.com/adblock/easylist-nocssrules.txt
- specto 12y agoI like it, though every once in a while something will be blocked in the middle of the screen and I can't dismiss the red blocked area to get to the actual content.