Hacker News new | comments | show | ask | jobs | submit login
Adblock Plus is probably the reason Firefox and Chrome are such memory hogs (extremetech.com)
748 points by lelf 882 days ago | hide | past | web | 400 comments | favorite

Together with umatrix (https://github.com/gorhill/uMatrix/) are the best chrome extensions

Since I went back to firefox those are the only extensions I really miss, there is policeman (https://github.com/futpib/policeman/) but it's not as good as them yet

To whoever develop extensions, please don't focus only on chrome, firefox during the last months has become must better that it was before, if developers only consider chrome, people will eventually migrate to it and firefox will die. Even though chromium is open it won't be good for the ecosystem

I do want uMatrix ported to Firefox. The developer who ported uBlock[1] has now made it more easy for me to work on a port of uMatrix, as I have now a model on how to proceed + a lot of code which can readily be shared with uMatrix. Once it is ported, in all likelihood I will myself go back to use Firefox as my main browser.

[1] https://github.com/Deathamns/uBlock/tree/ports/xpi

Is there anything we can do to help? I'm not sure I personally can help - I've never looked into extensions, but there may be others who can?

As my paranoia ramps up year on year, I now use Opera with µBlock. For me, it has the polish of Chrome with some nice extras, but without the increasingly creepy Googality. It works fine, although I've not tried µMatrix. (I have my defaults changed to DuckDuckGo. Usually connecting via a VPN.)

I've whitelisted a few sites I like to support (a couple of webcomics, HaD etc).

I have a lot of filters: "62,501 network filters + 40,728 cosmetic filters".

Opera's task manager says the extension is taking up a mere 32MB. Probably not accurate, but a lot better AdBlock (my previous favourite).

Off-topic but I wish people would stop using Mu for project names. Where is the Mu key on the keyboard? I have to copy and paste or alt-code it. Call the project microBlock or something! They use "u" instead of "µ" on Github, so why not just use something else entirely?

µTorrent was the one that really irritated me because I couldn't type "utorr" to search for it on my start menu.

I'd say something to gorhill (albeit far more politely), but it seems childish and ungrateful. He's clearly poured so much time and effort into making such useful software. "Great software but the name is fucking annoying, mate!"

I myself most often write "uBlock" and pronounce "you-block", as in "users decide".

I originally used the mu character in place of the u to emphasize smaller resource footprint relative to similar solutions out there.

I've never been good with picking name etc., unfortunately now we are stuck with it.

Don't sweat it. It's actually quite a good name. It works both as "you block" and "micro block" depending on reading the first character as "u" or "mu".

If this is motivated by your paranoia, why are you switching to a closed-source browser?


A security audit done by whom? Surely not people paid by the vendor of the product bring audited... Right?

Use a compose key system, native on Unix (Linux, Mac, etc) and available on Windows. It's very intuitive and will open up your character vocabulary considerably. I use the caps-lock key for compose.



Sadly, the US-International keyboard on Windows does not implement a shortcut for the "micro" character (http://support.microsoft.com/kb/306560).

In addition, I pretty sure many European keywords can type µ by alt-gr+m, at least in Windows on my Danish keyword. Only know that because once I had a keyword were they actually had printed it on the key, just like they always do with € on E.

There's always character map which has this and like all others you can ever think of. A bit cumbersome, but at least one doesn't have to remember character codes and can search for characters by name.

"Let me google that" pulls out character map pretty poor UX if you ask me. Almost as bad for search ability as calling your product "go" or "cloud" or "driver" or any other one-word generic, hard to find even with contextual terms around it.

pretty poor UX if you ask me

yup. Has been around since NT or maybe even longer..

the poor UX is not the Character Map

It is having to open it every time you want to type the name of µSomething

The poor UX is the keyboard layout throwing away altgr.

> Where is the Mu key on the keyboard?

At least for me, option-m is the µ key.

There is a μ on the German QWERTZ keyboards.

On Apple keyboards Alt+m prints µ.

DDG lies about not tracking you. Startpage appears not to.

N00b here - why would someone use both?

I've tried a couple of times to work with uBlock and uMatrix. I ended up going back to ABP each time. The 'block an ad on this page' feature is one of its best and most useful. That, and it doesn't go too far in blocking useful item on-page.

As I said in a similar thread on Reddit a few weeks ago, uBlock has some way to go before it can be considered user-friendly (at least, for the user who isn't familiar with the intricacies of how browsers work). I would love to be able to use it, though. ABP is an enormous resource hog on my system, but more to the point, pages render so slowly when it's switched on.

I use NoScript and RequestPolicy for full white listing functionality in Firefox.

I went back to Firefox in the last couple of months and I wholeheartedly agree. I used to use HTTPSwitchboard in Chromium (which divided into uMatrix and uBlock) and I miss it in Firefox.

How does uMatrix compare to something like Ghostery? Would it be redundant to have both?

Isn't ghostery owned by an ad company?

Yes, however the GhostRank feature that people don't like is opt-in not opt-out.

What was wrong with Firefox?

I've used it every day since starting a new job seven months ago and I've not noticed any issues with it.

Firefox has improved a lot and it has been good for more than I year (I switched back in the middle of last year). Before that it was slower than Chrome, and it crashed when trying to read very large pages (eg a tumblr page of gifs).

Google helped to close the gap by making Chrome more bloated and much more unstable.


> learn how to respect the native operating system UI guidelines

Your comment is almost worthwhile just for the irony in this.

Tabbed browsing basically hijacks window management away from the OS. Tabs are always implemented customly in-app (UI break) - and break the UX of window finding, switching, etc. (doubly annoying in a tiling WM, btw). That's all browsers.

> Personally, I hope Mozilla goes away and some other group comes along to fill the void [...]

> No, I much prefer that Mozilla just go away and die.

Yeah, they're just squatting on that cyberspace and not letting other people through.

Plus, FF is bundled/pre-installed everywhere nowadays; sickening! Your hatred is well placed.</s>

Funny, as an early windows user, I had gotten very used to alt-tab for inter-app switching and ctrl-tab for in-app tab/subscreen switching... which works for browser tabs for me... add in shift to reverse the direction.


So what's exactly your point? How does Mozilla interfere with your life and worsen it, so that wishing them to "die" would be justified?

Why don't you just ignore them? Why do you want thousands of people to lose their job and why do you want to take away an open source software that's liked by millions of users?

So, it's OK when thousands of people here say that they wish Microsoft would go away but I can't say that about Mozilla?

Makes sense.


Perhaps it's less about popularity and more your delivery.


I would be much less doubting in your position. I downvoted and flagged you for your jerkish rhetoric because it doesn't contribute to the discussion.

Sure it does. I asked why Chrome, not being open sourced, is "bad" for the ecosystem. Unfortunately, I packaged that with an unpopular opinion. Hence, the censorship doled out by yourself and others. Way to go!

Nah, that fate should be reserved for Mozilla, apparently.


"No, I much prefer that Mozilla just go away and die."

If you're going to try to split hairs over "kill them" versus "go away and die", you're going to have trouble convincing people.

If you don't think there's actually a big difference between actively trying to kill something and hoping that it just goes away and dies, then I guess there's nothing else to talk about.

It's a good thing that people don't need much convincing since Firefox is apparently dying anyway. Good riddance I say :)

One thing I would like to point out, is that there is a bug currently in Chromium 39 which causes a new memory leak each time the popup UI of an extension is opened:


This affects all extensions.

Just so people are informed memory figures won't be too reliable as soon as you opened even only once the popup UI of an extension. (In all my benchmarks I of course avoided to do this).

does this happen only when you click the ublock and it opens a popup window or with any extension popup UI?

Any extension popup UI, which appears when you click an extension icon. The more complicated the HTML document in the popup, the larger the leak.

what about extensions without a popup UI?

In some tests, uBlock results in the browser using less memory than with no plugins: https://github.com/gorhill/uBlock/wiki/Firefox-version:-benc...

n.b. Firefox results from experimental patch: https://news.ycombinator.com/item?id=8802509

That was my experience. My usage for four pages was about 80M with uBlock, 120M with AdBlock Pro and 200M with nothing. Pages also took like 1s to load with the blockers and 12s without because of all the ad junk loading. (with Chrome)

I tried µBlock but it seems to be extremely trigger happy. For example Youtube front page doesn't show any videos and Facebook doesn't load at all (basically it blocks everything other than its side bar). I can obviously white list those sites but my concern is that next time I visit some site for the first time I will not know if its broken or just µBlock acting up.

----- EDIT

I reinstalled the plugin and the problems went away. So far looks good.

> Youtube front page doesn't show any videos

I see videos all fine on Youtube front-page, using out-of-the-box filter lists. That kind of issue was never reported for uBlock. I would need to know exactly what filter lists you were using, including custom filters.

uBlock relies on 3rd-party filter lists to do the job, specifically, out of the box:

    - EasyList
    - EasyPrivacy
    - Fanboy's Social Blocking List
    - Peter Lowe's Ad Servers
    - Malware domains
So if you think it blocks too much, un-select the filter lists you do not want.

Bottom line, whatever filter lists you use in uBlock, you will get the same results with the same lists with ABP.

That's odd. I actually unselected some lists and white-listed some sites and the problem persisted. I disabled the extension and all sites started working as usual again. I am running Chrome 39 on Windows. I'll give it another try now - will uninstall / reinstall to make sure the default lists are being used.

I haven't tried ublock yet, is it obvious how to work back from a broken page to figure out which blacklists need adjusting?

I'd also recommend that the defaults should have YouTube and Facebook (at least) working out of the box. Otherwise I think people will just uninstall the plugin, rather than trying to figure out how to fix it, which would be a shame.

Having just tried uBlock, the defaults do allow both Youtube and Facebook to work out of the box (and exactly the same as with adblock, as far as I can tell). I think the poster must've had some other problem. (or maybe some of the filter lists changed in between his problem and my trying it, which is equally possible)

EDIT: ( Chrome 39.0.2171.95 (64-bit), linux )

It works exactly like AdBlockPlus in terms of user experience. There's no way that you could have been using ABP and suddenly are flummoxed by uBlock.

If you have things being blocked you don't want, either whitelist the element or find the block rule in your rule list.

YouTube and Facebook definitely both work 'out of the box' with the recommended lists.

Yes, it seems to work well for YouTube and Facebook now that I've had a chance to try it.

Still, I don't think everyone out there who has ABP installed necessarily understands how to use it, or how it works. I have installed it for my wife, and for friends, (the kind of people who spend 90% of their time on a handful of popular sites) and if Facebook or YouTube was broken they wouldn't know why or what to do about it.

EDIT: Spelling

Seems to be working well on my second attempt. I am still not sure what was wrong before.

I'm also finding it doesn't work on sites where Adblock worked. For example Aeroplan.com. I've reinstalled it and it still doesn't work.

Too bad its's not for Firefox

Someone is working on it there https://github.com/Deathamns/uBlock. There is also experimental xpi https://github.com/gorhill/uBlock/issues/27.


Thank you :)

I use Bluhell Firewall, it isn't as good as ABP but it is definitely better than nothing and so light

For those using Safari, there is a preliminary version of µBlock here: http://chrisly.me/0B0s2Y2Y3b0R

Note: No automatic updates with this unofficial build.

Impressive, it's already much much faster than AdBlock.

Thanks for the recommendation! Long time ago I've uninstalled AdBlock due to the noticeable performance issue and have been suffering the ads on the news websites, will now try uBlock.

Thanks, haven't heard of uBlock until now. Giving it a try.

I find ublock breaks many more websites than ABP.

I usually wouldn't notice a broken website with ABP, but with ublock I see something wrong at least once a week.

iirc, ublock also blocks api.google.com (i guess it's the analytics javascript files?), which incidentally, also breaks a lot of sites that uses the google common javascript library CDN (which servers stuff like jquery etc). I whitelisted it and it seems to unbreak some stuff.

> ublock also blocks api.google.com

There is no filter which matches "api.google.com", so this can't be blocked, unless you have a custom filter which does that.

> also breaks a lot of sites that uses the google common javascript library CDN

uBlock uses third-party filter lists such as EasyList, EasyPrivacy, Peter Lowe's, etc. It won't block more than what is spelled out in these lists. Un-select whatever filter lists which you think should not be selected.

As I have said countless times now, uBlock will block as much as ABP blocks when using same filter lists.

As always, if you think something is blocked which should not be (for example if ABP with the same lists has a different behavior), I need a URL, a test case in order to be able to infirm/confirm that the problem is with uBlock and not with the filter lists. On that ground, uBlock has been quite stable for a while now, I don't remember the last time something was blocked which should not have been blocked (or vice versa) as per filter lists.

Thanks! This is my first time to hear about µBlock. I have uninstalled ABP to use µBlock to see if there are any difference.

I desperately need ublock for mobile.

it probably needs a better way to whitelist sites/pages

I frankly don't know how to improve on clicking the big fat green button in the popup to whitelist a site (Ctrl-click for a specific page).

It's not at all obvious what that button does. The icon is typically associated with "power on/off." While I can see how this is supposed to suggest whitelisting in an abstract and metaphoric sense, making that connection is a bit of a stretch, particularly for casual users.

I suggest removing the icon and just putting a plain old checkbox with a label that says "Whitelist Site".

Addendum: The apparent scope of the icon is browser-wide, not limited to the current page. Since the "power on/off" icon is unqualified, it seems like clicking it will turn the entire plugin on and off, not merely whitelist the current site.

If you hover over it, it tells you exactly what it does.

"hover over it to find out what it does" does not constitute good UX unless you're talking about a toolbar with a multitude of icons which cannot all (by sheer numbers) be "intuitive".

I'm not claiming it's the best UX, and I have no particular affinity to this program, but it's really not hard to tell what it does, especially for the demographic here.

Nor do I have any particular affiliation or affinity. It just sounds like poor UX/UI.

I guess the whole "hover over it if you're confused" thing is pretty established by now, so I'd say your original assessment is probably the correct one. I just want us (the industry) to get better at this stuff! :)

Fair enough; that's totally reasonable, and I agree with you. I guess I just had an objection to the post I originally replied to which (seemingly) had the attitude of it being impossible to tell what the button did. The UX could certainly be better, but it's not bad.

Yes, but it is not intuitively obvious for the ordinary user who would account for the majority of page views and potential advertising revenue.

sorry, i never hovered on it. thanks

thanks for pointing out :)

Thank you so much for these!

I use AdBlock Plus not because I don't want to see ads...I actually don't mind ads. I use it because I don't want auto-starting audio, ever. I have 30-60 tabs up at any given time. When an ad starts playing audio, it disrupts my entire workflow, possibly disturbs my partner sleeping next to me, etc.

In short, auto-start audio in ads is quite simply so far outside of what I consider acceptable behavior, that I'm willing to burn the whole goddamned business model to the ground to stop it. I disable AdBlock Plus for sites that I know to behave responsibly with regard to their ads (reddit, probably a couple of others). If there were a list of Advertising Good Citizens who never use auto-starting audio ads (such a list would probably need to demand a few other things, like a good privacy policy, no popups/popunders, etc., but audio is the single reason I installed AdBlock Plus), that could be dropped into AdBlock Plus, I would happily use it. I don't mind ads, but the second somebody disrupts my work, my conversation on Skype, my partner's sleep, my music listening, etc. is the second I grow to hate the site and the advertiser.

Well I use it (and I assume most people use it) because I don't want to see ads. Advertising on the web is largely just obnoxious, ugly, and crude. Also the relentless tracking is a little creepy, so there is another small benefit to using an ad blocker.

I know there are some small groups trying to do good advertising on the web but it is so insignificant it doesn't even register. Large and important websites don't care enough to curate their advertising (or won't curate it to an acceptable level because of the financial hit they'd take), it is a lost cause.

The worst part is that this shit-show is steadily seeping into the mobile app ecosystem, at least on Android (I'm not on iOS enough to make a judgment). I don't know how many times I've seen beautifully designed apps with a damn ridiculous yellow flashing banner (etc) shoved in the middle of it. And 99% of the time there is no option to pay for a version of the app without advertising. I get why people do this (gotta pay the bills, Android users won't pay for apps, etc) but it sometimes seems like people don't take any pride in software anymore. :(

In contrast, I was quite surprised with how pleasant the advertising is on my Kindle. I suppose that can be a benefit of having a closed ecosystem and a device with limited capabilities.

Glad to see this point of view represented. I have never found the indignant reaction to the use of ad blockers very believable.

Advertising is predicated on lies, by definition, and I am only interested in making consumer decisions as far from the influence of marketing departments as is practicable. Advertising is the very worst that capitalism has to offer.

Moreover, I am not interested in being distracted by ads, ever.

If the the web turns out to be a house of cards that crumbles without billions of dollars of vapid ad revenues, then maybe that's a positive evolution.

I'm not against advertising. I just think most of it is done badly and in poor taste. If you want to sell me something in an entertaining or classy way I am more receptive than I would be from you just shouting at me. I think "shouting" is much more effective however, so companies that advertise generally DGAF.

It's not only the worst part of capitalism, advertising works by exploiting human psychology. Once you see the ad its effects take place and there's no way to avoid it. There's no way to mentally forget stuff like brand recognition. The only way to stop its effectiveness is by having it blocked altogether.

>Advertising is predicated on lies, by definition

Well not really. You can for instance have a genuinely good deal and just let people be aware of that. Though lying does happen of course.

Just enable click-to-play in chrome, on media plugins. Sound only ever really auto-plays from flash ads and such (though these days its possible with HTML5 and this likely won't stop such audio/video). Its an extra click and can make some sites a bit more difficult (e.g. beatport, tries to hide its flash so you cant click it to enable it), but it works for me.

Click-to-play on plugins often breaks sites that use Flash ads as overlays. The ads often have the "close this ad" in the Flash code itself, making it impossible to kill the ad layer without activating the plugin. (In my more cynical moments, I wonder whether this behavior is by design.)

> making it impossible to kill the ad layer

Use the context menu. There is an option to "hide" (delete) the ad there.

Another option is this bookmarklet (only works if the element that should be deleted isn't in an iframe):

    javascript:(function(){var e=document.body.style.cursor;document.body.style.cursor="crosshair";var t=document.createElement("div");var n="border:1px solid #3280FF;background-color:rgba(50,128,255,0.5);position:absolute;z-index:2147483647;display:none;";var r="pointer-events:none;";var i="transition:width 60ms,height 60ms,left 60ms,top 60ms;";n+=r+"-webkit-"+r+"-moz-"+r;n+=i+"-webkit-"+i+"-moz-"+i;t.setAttribute("style",n);document.body.appendChild(t);var s=null;var o=function(e){var n=e.target;if(n!==s&&n.parentNode){var r=n.getBoundingClientRect();var i=document.documentElement;var o=document.body;var u=i.clientTop||o.clientTop||0;var a=i.clientLeft||o.clientLeft||0;var f=window.pageYOffset||i.scrollTop||o.scrollTop;var l=window.pageXOffset||i.scrollLeft||o.scrollLeft;var c=l-a+r.left-1;var h=f-u+r.top-1;t.style.display="block";t.style.left=c+"px";t.style.top=h+"px";t.style.width=r.width+"px";t.style.height=r.height+"px";s=n}};var u=function(n){document.body.style.cursor=e;if(n.target.parentNode)n.target.parentNode.removeChild(n.target);if(t.parentNode)t.parentNode.removeChild(t);window.removeEventListener("click",u,false);window.removeEventListener("mouseover",o,false);n.stopPropagation();n.preventDefault()};window.addEventListener("mouseover",o,false);window.addEventListener("click",u,false)})();void(0)

At least the Chrome implementation has a little X in the upper right corner which you can use to delete the Flash object without ever activating the plugin.

Personally, I just don't have Flash enabled at all – it's a security win and I haven't heard my laptop's fans while browsing in ages.

in which case, i use the inspector and delete the html element containing the ad overlays.

Yep, should be able to disable autoplay via browser setting.


Youtube, while not an ad, still autoplays and is pretty annoying. I used to have an extension to auto pause videos but Google forcibly removed it from my browser.

Couldn't you bind most of the offending domains to in your hosts files and skip the browser extension?

Maybe. But, then I'd have to maintain the list. I used to do that, many years ago, for problem domains using a local Squid installation (my first company was based around Squid, so I already ran the local Squid 24/7), but, maintenance of the list was time-consuming. AdBlock Plus is set it and go (I occasionally have to disable it for videos of something, but it's so rare that I sometimes forget I even have it running).

I don't notice the performance or memory problems being discussed, so it's not a big deal for me. My lappy has 8GB of RAM and I've never run into memory problems. But, I guess my tablet (with only 2GB of RAM) or phone probably shouldn't run AdBlock Plus, even if it becomes available for Android. Somehow I never see auto-start audio ads on those devices. Maybe I should just figure out how to make Flash and audio behave the same on my lappy.

The issue with that, in Windows at least, is that host lookups become a lot slower with a larger hosts file; a local caching DNS server with a block list is possibly a better solution, and one I think is already adopted by some.

Another issue with this design is that Adblock extensions hide the blocked elements, using the hosts file leaves loads of 404's all over websites and it looks rather ugly.

Way back when, I wrote a simple web server that ran on localhost that served empty files for any .html, .js, etc. request and 1x1 pixel images for any .gif, .jpg, etc. request.

It worked pretty good. As a poster upthread noted, though, the big issue with this approach is maintaining the list.

The better ad networks ban auto play audio. Unfortunately, what ad networks are being used on a given page can change frequently, as publishers shift between what ads they show based on who is bidding highest.

There are advertising standards boards that recommend against these kinds of ads, but unfortunately, not enough publishers take them seriously.

This is why I usually have my audio muted.

This works very well outside of a browser, too. For example various beeps from Window Manager or terminal emulator or particular programs can be very irritating and disabling them all means going through endless pile of different "settings" dialogs.

It breaks down, however, when you want to listen to some music while working. In the end I have my audio muted most of the time, but over time I had to go through all those settings anyway.

this seems like a much easier (and more foolproof) solution....

I basically agree, in that I disable auto-starting audio at all costs.

Truth be told, I don't bother going back and whitelisting sites that may be OK.

People aren't using Adblock to conserve resources. They're using it to block ads and most are willing to take a performance hit to do so.

That's not why I started using Adblock. I started because the web became unusable on an older machine (5 years). The content wasn't any more sophisticated but it soaked up all the resources (CPU, RAM etc.) available. Imagine if you had a PDF reader that ran at 100% CPU and swapped all the time!

I have an atom dual core small PC connected to my TV (it runs windows 7, yeah I know) and it's 'ok-ish' with performance, but starting a browser is a tad slow (chrome) and adblock makes it even slower as it's a plugin which is particularly slow to start. So I don't think blocking ads for performance reasons on slow machines is still cutting it if you take into account the performance penalty of abp.

All things considered however, it's IMHO a small price to pay for having the freedom to decide which content is fetched during page rendering and thus which services won't know whether you're visiting a certain webpage.

In general, anyone who is on Hacker Newa is not who I'm referring to when I say "people". 99% care about not seeing ads.

>Imagine if you had a PDF reader that ran at 100% CPU and swapped all the time!

So...Acrobat Reader?

Indeed, the post you replied to is not based in actual reality. The entire foundation of the adblock industry was an aggressive attention-war plied by the ad business, where soon webpages were an armed conflict of aggressive ads each imposing even more of a tax.

No one expected the cure to be worse than the disease. I couldn't believe it somewhat recently when I had to use an older laptop to find that simply running Chrome was completely untenable if ABP was installed.

I so agree! I have been annoyed at Firefox's resource hunger for a couple of years, now, and I have been aware of ABP being a major factor in that, too, but all in all, I think it is still worth it.

It is a sad reflection on the state of advertisement, but lacking any viable alternatives, using an adblocker (and NoScript) is pretty much non-negotiable to me. I am always apalled when I have to use a browser without an ad blocker installed.

It is not that I mind the ads in general, but too often, they are seriously distracting, and advertisers seem happy to go totally overboard. Imagine walking down the street and looking at blinking, flashing billboards. Imagine turning on your car and being greeted by an ad before the engine actually gets going. If ads outside the Internet were as annoying as they are online, we probably would have riots. (And that is ignoring the malware.)

Firefox is actually much less resource-hungry than Chrome, though that's largely because it doesn't (yet) use different processes for different tabs....

Actually, you can turn that on now to check it out: http://www.jkwebtalks.com/2014/02/enable-multi-process-tabs-...

No, that uses a single process for all tabs.

? No, the multi-process tab feature is all about one process per tab.

Maybe someday. Not today. You get one tab process that crashes often.

And I wouldn't say that's the 'point'. Chrome groups tabs into fewer processes most of the time.

Personally I'm much more excited about the possibility of a compacting GC.

You get one process that crashes about as often as Chrome, though it consumes fewer resources and is much faster to restart (by not loading tabs unless you go to them).

The increasing crashiness of Chrome was one of the reasons I stopped using it.

You're a lot luckier than I am.

Also it still takes a nontrivial amount of time to not-load a lot of tabs.

Not-loading tabs is a heck of a lot quicker than loading them (and I usually have more than 500 in Firefox). Otherwise, I'm not the only person who has had too many problems with Chrome: https://productforums.google.com/forum/?utm_medium=email&utm...

i've found just ghostery with the ad blocking lists is just as good at blocking ads, while being faster.

The idea that you have to choose between a blocker or resources has become common unfortunately.

It's unfortunate because this idea being held as a premise by so many users kind of give a free pass to developers to not work harder to improve their code.

I'm using adblock type stuff to conserve resources. After finding out about the memory use my safari process size went from 6g to about 3.5g (i'm a heavy user of tabs). So yeah it comes in handy for resource conservation.

Sure using a blocker there's some expectation of resources used but in the case of Adblock it's ridiculously high and has really bad response to the number of iframes on a page.

This is just not true (your first claim that is, I would say people use it for multiple reasons). Adblock can certainly conserve resources in some cases. I know one webpage that loads 2-3 very resource-intensive banner ads every 30 seconds or so. I've seen websites that do a lot worse too.

I would just like to say I have never been a major user of Adblock. There are two reasons I have always been okay without it:

1. I feel somewhat bad about using a free service and preventing them from getting ad revenue

2. I'm really good at ignoring advertising of all kinds. People might say it still works subliminally or it has an effect on me and I just don't notice it, but I seriously don't believe this is true. With TV I used to mute it, change the channel, or do something else on my computer (I don't watch TV anymore, but I do admit I pay attention to ads if I join somebody else that watches it). With video ads on the internet I mute the audio and do something else on my computer. I basically have never intentionally clicked a banner ad, besides maybe some Facebook ads only because they seem to have access to my Amazon search history and show me items I'm already shopping for. Facebook is certainly a different beast in terms of advertising because it involves showing businesses that friends have liked, but I wouldn't say this has a very positive effect on my opinion about that business.

That said, I used Adblock many years ago around when it first came out to block YouTube ads but switched over to my muting/ignoring method because it did affect my conscience negatively, not so much because of YouTube/Google but because of other content I browsed on the web.

My setup recently has been to have Adblock installed on Firefox (I have always primarily used Chrome) for the instances where ads on a website are causing performance/experience issues. I have had Adblock installed (disabled) on Chrome because I have a Chromebook and have occasionally enabled it in order to visit the problem website on it (it is pretty much unusable on this Atom processor without Adblock). In the past several months I have noticed some very weird bad performance issues if I leave it enabled and use YouTube (maybe some other websites), not sure if this is due to changes in Adblock or if YouTube is intentionally breaking itself when it detects Adblock usage.

P.S. I'm not sure if any of this has anything to do with my previous post being downvoted, but I felt compelled to explain my reasons for using Adblock.

P.P.S. The website I am primarily talking about that has become nearly unusable and quite unstable due to ads is tinychat.com... My reasons for being okay with blocking them for this website are complicated and I'd rather not go into detail.

Resource conservation is one of the primary justifications that people cite for why they block ads: many ads have high level of animation, auto-play videos, and so on, that it lags down the experience, especially when a single page has a number of them competing for your attention.

I would be surprised if many would agree with accepting a performance hit for what ostensibly is your browser doing much less.

I used to not do Adblock, because you know, ads make the internet go round and all that.

But with the "download here"-button ads, there is no way to know what button to press anymore. Now installing Adblock is a requirement.

What pushed me into using it was when comics.com (now gocomics.com; the official online source of a number of syndicated newspaper comics) had ads that would -minimize my browser-, display a pop up designed to look like a Windows system warning, that advised me to download some malware masquerading as a virus scanner.

Gocomics.com is a particularly good example - I find it surprising that they appear to accept such low quality (one weird old tip) and shady (download now/you have 1 new messages/etc) ads.

It can be tricky to balance between going broke and accidentally showing ads that some users dislike when you're using a large network like AdSense.

As someone with a browsing profile that isn't targeted by those kind of ads, I've found out second-hand that I've been running ads like that a few times. Trying to prune specific ads is an endless game of whack-a-mole that I've never been able to win, and disabling an entire category of ads just to prevent 1% of them from running is very tough on the bottom line.

That really is a problem and it took me a while to figure out that sites weren't actually/necessarily endorsing those ads.

There should be an easier way of black/white listing certain types of ads when setting up adsense.

Adsense could also try enforcing their policies once in a while too. I remember complaining about a series of shady "Download Now" ads earlier in the year, including full URL trails, etc, as required by the complaint process. Needless to say, not one damn was given and the ads continued unchecked.

THAT is why people install Adblock. Content owners crying butthurt because "Adblock hurts the sites you love" ignores that the sites you "love" can often just not be trusted not to accept ads that are shady, scummy, or worse. And there is no excuse for that. If your business revolves around spraying dog mess over people's windows, don't be surprised when people put up fences. You reap what you sow.

Is actually very easy to solve. When someone wants to run an ad on your ad network. The vetting process should be more than "how much money you got?" If not for their own sakes anyway.

Ad block needs to continue to run rampant over this "internet economy" because advertisers need to come to terms with the fact that now a days users get to choose what they see and how they see it. Maybe one day it will occur to someone in the industry that aggressively hostile ads are ruining their industry rather than being a staple of it.

If they don't... Then I don't mind seeing that industry die.

It's not easy, because there isn't really much of a vetting process on most ad networks; everything possible is automated.

You may not mind seeing that industry die, but until you start paying for visiting websites, you'll have to amend that to say "I don't mind seeing the internet die".

"The internet die" huh.

I think you'll find in the absence of one solution, another presents itself.

As an example, github is not an ad based service, nor is it some sorta bait and switch. It's terms are reasonable and is generally useful to everyone.

That is ridiculously dramatic to say "The internet will die"

It's just the shitty part that will die.

Unvetted ad networks considered harmful.

I would be ok with some (not-too-intrusive) ads to make the internet go around. But every single website now links to 30 trackers that try to track and profile your every move on the internet, with no accountability anywhere.

In addition to the NSA, GCHQ, SVR RF, Mossad and other n-letter agencies, there are some 30 corporations that know everything about what and where you browse, keep that data not-very-secure, sell it to the highest bidder - any bidder, actually.

Do you like that? I don't.

Yeah, the best example is YouTube - sometimes more than 100 elements shows up in AdBlock. There are afaik 3 blocks of ads + possible few trackers. Then what is the other 90?

Honestly, I've only seen the "tricky" Download Now buttons on shady video websites (read: those that have all the episodes of Seinfeld on them).

Though I've had more and more invasive ads in newspaper sites (the fact that I get so many ads on NYT's site despite being a subscriber is frustrating to say the least), I do like keeping free websites running. I find using ABP to be somew immoral , violating the contract with which you're looking at someone's content. I have less sympathy for people who are basically showing stolen content (not technically stolen , but still), though...

They are pretty common on program download sites, not just on pirate sites.


> the fact that I get so many ads on NYT's site despite being a subscriber is frustrating to say the least

Have you never seen the print edition of the NYT (or any other newspaper)? Since they just use news to fill in the otherwise blank areas between ads the motto really should be all the news that fits, we print.

"they just use news to fill in the otherwise blank areas between ads"

That is pretty much literally true. When I worked on a student newspaper, it was pretty common for the advertising manager to rush in to the editorial offices and say things like "I've just sold another full-page ad, so we're going to be printing extra pages - do you have any copy to fill them?"

> When I worked on a student newspaper, it was pretty common for the advertising manager to rush in to the editorial offices and say things like "I've just sold another full-page ad, so we're going to be printing extra pages - do you have any copy to fill them?"

Perhaps at a student paper, though that's considered a pretty huge ethical breach. I can attest that the New York Times definitely does not do that; they take this separation very seriously. Even at their headquarters, as of relatively recently, business and editorial enter through separate elevators, as they are on opposite sides of the building.

There definitely are publications without such strong and heavily enforced senses of editorial ethics, but the New York Times is not one of them.

That's bollocks - it's not in the slightest an ethical breach to do that. It's just advertising working with production to make the product. We're not talking about running advertorial or anything.

The papers I've worked on usually had a little flexibility in terms of extra copy or advertising to populate pages as required.

> it's not in the slightest an ethical breach to do that. It's just advertising working with production to make the product.

Well, that by definition would be considered an ethical violation at a paper like the Times. Not at a student paper, no, but at the New York Times, definitely.

They're not asking for any adjustment to the content, but for extra content, eg a feature piece that isn't tied to a particular date. Bear in mind that a full-page ad only covers one side of the paper so you need something for the reverse side, and newspapers are generally printed on folding sheets (ie 4 pages to a sheet), so that means 3 extra pages to be filled. It's not like the advertising department content is suggesting which content to use. Every newspaper has a variable pile of feature material whose exact publication date depends on the size of the print run, which is highly variable.

I'm curious about what you think the ethical breach here is. Advertising and editorial departments have to coordinate on practical matters like page layout.

No, it wouldn't. By definition, the advertising department has to talk to production to establish runs and page counts. I guarantee that this happens at the NYT, because a paper could not possibly be produced without this process.

What possible ethical issue is there?

No, that's entirely wrong. That's how the layout for a newspaper is established and the news budget (meaning what will fit in the paper) is set — it's mostly based on the size and requirements of the ads that will run in that day's paper. If you have a really important story (or a dearth of advertisers), you might add pages for editorial content without regard to ads and fill the layout holes with house ads, but the actual size of the paper is determined by your advertising. That's literally what's paying for the paper you're printing on.

I agree about the Times, but what in the story about the student paper constituted an ethical breach? The ads were not influencing copy, just allowing more to be printed.

I recall having bad experience with these things on (or via?) sourceforge. It's probably the main reason why sourceforge dropped to last resort for me.

cnet.com is a particularly egregious offender - I also stopped DLing anything from there because they started bundling things inside a wrapper of crapware.

They're a plague on SourceForge.

I got tricked once by one of those while on Sourceforge. Words can not describe how annoyed I was that day.

And if you try to download Windows binaries from Sourceforge, your download may be enhanced with WinZip, the Ask.com toolbar, and other optional offers.


This is a nice little app recently developed that can help you out with those 'installers'.


In many cases it's not the program authors that added those installers, but SourceForge and/or its mirrors.

Thankfully, we shouldn't see GitHub pulling any shit like that anytime soon (or if they do, I won't be able to see it, as I use Adblock Plus...).

Flashblock is my middleground. The advertisers can have images, but the worst offenders are the Flash ads, and they get blocked.

Flashblock is not needed on Chrome - go to settings/advanced/content settings/plugins and select "click to play". Now flash will not run automatically. But you can decide to click on something and allow it to play if you want. Works great - no plugin needed.

Same in Firefox.


Though I just never bothered installing Flash. If I need Flash for a site, I use Chrome (which comes with Flash embedded, I believe).

Firefox differs from Chrome in that it will enable Flash for a whole page, rather than per-element. This means you still need an extension for blocking Flash ads on Flash video sites.

Firefox's model is better, I think. Plenty of sites use hidden flash videos for various utility functionality. How are you supposed to click on these hidden videos so that you can enable them?

You can get the equivalent in Chrome by clicking the puzzle piece in the location bar and selecting "Run all plug-ins this time".

And that extension doesn't work if javascript isn't enabled for that page :(

fixes facebook's attempts to autoplay videos too

I've been using the web for pretty much as long as it has existed ('94) and I've always held off on using an adblocker mostly just as a test to see if I could. I finally broke down recently and started using abp on chrome. Sometimes pages will take a while to load but overall it's just such a better experience.

I should note that I have no qualms about blocking ads I would never click anyway. I don't harbor ridiculous puritanical notions that I must suffer in exchange for "free" content. Nor do I abide by the notion that anyone else has the right to sell my attention merely because they make content. Monetization should be cooperative, not coercive (and I also support content creators directly quite often).

AdBlock+ is bad, but intrusive e-marketing is worse.

I barely use it myself, but for friends and family who need tech support I always install it. It reduces so much risk.

I'd love an adblocker with a blacklist instead of whitelist so I could keep the ads on for the long tail of my browsing and remove them only on sites that go overboard.

Just remove the default block lists. I do this with adblock+, only adding rules for things that I decide are obnoxious (mostly trackers).

Could you somehow whitelist all domains and go from there?

Not on a computer right now to try it out for myself, but it sounds like an interesting approach.

Thankfully whitelists are a thing.

For me it was my first autoplaying video with sound in a pop-under.

Fuck that. You pull that shit, your whole industry can just go and get fucked. If you need to pull that shit to live, you need to fucking die.

This laptop has 8GB because Firefox with ABP is really fat. It's worth every byte. I use FF for personal stuff, Chromium for work; occasionally I load a non-work page in Chromium and am bloody horrified at what the web looks like with ads.

What sites are you encountering those ads on?

You could blacklist them, rather than universally denying revenue.

This is what I've never understood about the people claiming that "they have no choice" or that they feel morally justified in denying revenue to authors and other content creators. I don't use ABP, but it's really not that much effort to have to see bad ads on each "bad" domain _once_, and then blacklist and not have to deal with that entire domain and their bad ads ever again. I do something quite similar with a JS blacklist (mostly for poorly-coded newspapers where I can't even scroll until they fetch some non-main-content resources over JS).

> "feel morally justified in denying revenue to authors and other content creators"

I do think that only a very small portion of adblocking users wants to "justify" anything in this regard. Most just don't want to see ads and skip the faulty and economically biased moral debate around it.

edit: While I agree that the blacklisting solution shouldn't be too much work, the charming "setup and forget" experience most adblockers provide will probably win through.

> I do think that only a very small portion of adblocking users wants to "justify" anything in this regard. Most just don't want to see ads and skip the faulty and economically biased moral debate around it.

This is possibly true, but not particularly relevant, as my comment mentions that I'm talking specifically about those who _do_ engage in moral justification. Among the people with whom I've talked about it, those who claim a moral justification are far more common than those who simply say "I don't like ads and I don't care about creators not getting paid". I would be surprised if there weren't many HNers whose sample is similar to mine.

Tangentially but not importantly, I'm not convinced that only a small portion of users openly think "yes I'm consuming a product without paying and I have no other justification other than 'i dont want to pay' ". Part of the reason you see such contortions in an attempt at moral justification is because one can draw a pretty clear parallel to "I would shoplift if I didn't think I'd get caught", with the only (somewhat dubious) distinction being differences in marginal cost.

Note that I have talked to people who have a moral stance on adblocking and piracy that _is_ consistent, but this is rare since it's usually accompanied by a pretty radical stance along the lines of "all information (music, art, writing, etc) should be completely free", which requires a pretty massive amount of philosophical baggage in terms of having a sense of how this affects the incentive to create said information.

Is "I am willing to pay through monotization models that are not ads" a consistent view in your perspective?

Of course, but that's not relevant in the slightest. Independently of whether or not one is happy with non-ad monetization, the decision under discussion is:

"In the _absence_ of non-ad monetization for a given product, do I decide that the transaction (view ads, get the product) is not for me or do I unilaterally decide to take the product without compensation".

O pretty much never click on ads, so ppc campaigns are worthless on me... as to ppv ads, most of them are obnoxious.. including on the main site I work for... I tend to whitelist it only because I need to make sure ads work.

That said, thankfully the new design has fewer ads, which should help a lot. It really just depends, it's easy to go down a rabbit whole with ads... but we get 90% if our ad revenue from 40% of our ads. So cutting out a lot changes the layout of income without nearly so much impact on revenue.

>...but it's really not that much effort to have to see bad ads on each "bad" domain _once_, and then blacklist...

I don't want to download a trojan from a malicious ad-server. Not even once.

I’d rather pay a few dozen bucks to buy more RAM than running the risk of been infected by malware served from compromised ad servers. Not to mention the significant decrease in aesthetics/usability when pages include a dozen different ad areas.

I don't know about aesthetics. I've found that AdBlock actually destroys a lot of the symmetry since the page was designed with ad elements in place.

That could actually be a novel technique against ad blocking. Make the website dysfunctional if the ads can't be displayed.

Many sites do this. Baseball-reference is one of them.

Yeah, having an option to pay for the site instead would just be crazy.

Having to pay to visit all of the sites out there which are currently using ads would pretty much ruin the internet for most people. Having a big banner at the top asking for donations seems to work rather well, though. See gnu.org and wikipedia.org for examples (though Wikipedia's donation campaign this year is a bit excessive IMO).

FYI, you can hide the Wikipedia donation campaign banners by putting this in a userscript that @matches http://*.wikipedia.org/*:

    setTimeout(function() {
    }, 1000);

This ublock custom rule worked for me:


Or just sign into your wikipedia account.

I consider them ads and use adblock to block those as well.

Doomed to fail since Google takes a chunk and it still leaves all the content available to anyone with adblock. It'll get some small use I'm sure but not enough to be notable.

I never notice this. I can almost always never tell where the ads actually were.

If your browser is vulnerable to drive-by malware, blocking ads is the least of your problems! Most malware is not spread by ads.

I see nobody has posted it, so here is a very lightweight alternative - it redirects all known ad-hosting sites to


Isn't it better to use something invalid (like instead of If you have a development server on your machine, rerouting ads to means lots of useless requests...

The author briefly discusses this and has made a version available here: http://someonewhocares.org/hosts/zero/

I use this as well (The zero version) but I wonder if there are any performance hits from doing this. I would think not but I've had sites (on desktop and mobile) lock up while waiting for something to load. Most of the time I assume this is some scrolling or "navigation" plugin that hasn't loaded yet (and not ads) but I'd love to read an analysis on hosts vs adblock vs µBlock.

It also works on android phones

Don't you need to be rooted to modify your hosts file on Android?

Yes, you need root.

i use the same approach. (https://twitter.com/beanieboi/status/546398095182163968)

it's not as elegant as hiding the HTML elements, you see some question marks on the page if safari couldn't load the resource. but overall i'm pretty pleased and it gets the job done.

> In Nethercote’s testing, he found that TechCrunch used around 194MB of RAM without ABP enabled

194MB for a single webpage that should mainly be text communicating a message. Does anyone else than me find this crazy?

Ads mean iframes, which mean tons of separate DOMs, which are heavy and expensive.

You also have to consider that images are decompressed for display; that 474x350 image in the lead spot on the Techcrunch homepage is 474 * 359 * 4 = 663,600 bytes in RAM, plus any overhead. When you consider how image-heavy sites have become, that's a lot of memory that can disappear in a hurry.

> a single webpage that should mainly be text communicating a message

That was more or less true of the web in, say, 1995.

Today, a web browser is an advanced programming environment with broad multimedia capabilities (including audio, video, and 2D and 3D graphics) that also happens to have some excellent document presentation features relating to text and images.

(Edit: I previously said this much better here: https://news.ycombinator.com/item?id=7743284)

You may think this is a bad thing, and that's a reasonable opinion to have. But if you think it's not true you'll only mislead yourself.

> Today, a web browser is an advanced programming environment with broad multimedia capabilities

It doesn't matter what the tool is to you. When we're visiting something like techcrunch, we're there for the text and then maybe a few pictures.

Not if it has rendered the text out so that scrolling is super smooth, in addition to the javascript, css and html parsing and optimization overhead. Don't forget the pictures too.

I think of the modern web as analogous to Windows: bloated and complex. I'd much rather have a Unix-web than a Windows-web.

I find that absurdly crazy. My Firefox sessions usually see between 300 to 1200 tabs open at a time. Now I understand why I need to keep crashing it to force the GC. I wish all tabs idle for longer than 5 minutes would be collected by the GC. I just need the tabs open for reference organization (like the History but with nestedness since I use Tree Style Tab) but I don't need all of them in RAM.

> I wish all tabs idle for longer than 5 minutes would be collected by the GC

I didn't check if they still work with new Firefox versions but there are extensions that exactly do this.

A bit off topic, but could someone explain to me why it's so difficult for a browser (or extension) to effectively block 100% of all pop-ups/pop-unders? I realize that these account for only a fraction of ads, but they are really annoying and it seems that these should be the easiest to detect; doesn't this essentially boil down to a few specific API calls? For the few cases that a pop-up/pop-under is legitimate (really, are there any?), I'd be fine whitelisting these on a case-by-case basis.

Effectively you're asking for all document.createElement calls to be blocked. Those are used for all sorts of things that aren't ads or popups. Blocking that would probably cause a very large percent of pages to be completely broken.

So there's no explicit way to distinguish between "new window" calls from other types of calls? I'm kind of shocked that, with all the effort that's been put into browsers in recent years, that the ability to "create a new window" hasn't been removed entirely from the API without explicit user consent. Again, I can't think of a single site that uses this feature legitimately.

If you're talking about actual new windows that are a separate process, those have been blocked by popup blockers for years. As far as popovers that block the screen/annoy you, those are just HTML elements that are positioned on top of normal content - its not a "special" thing backed into the DOM API. There's really no effective way to stop a page from being able to do that unless you disable javascript entirely.

There have been tricks that get popups through, possibly by exploiting browser bugs or opening the popup in one of the few on* handlers where browsers allow them.

I use strict pop up blocker on firefox which works great. There's a toggle button in case a site doesn't work properly.


They generally get around it by opening the popup when you click anywhere on the page.

Sounds like if Mozilla wants to improve Firefox memory usage, they should work on blocking ads natively so people don't need Adblock Plus.


You're going to love Tracking Protection: http://monica-at-mozilla.blogspot.com.au/2014/11/tracking-pr...

It's an in-development feature to block parts of websites that track you. In practice, it mostly blocks ads, and it blocks most ads. And it doesn't have the performance/memory hit of AdBlock Plus for two reasons:

* The domain matching is simpler (no regexps) and thus much faster.

* It doesn't use CSS to fix up the layout of pages that have had ads removed; it just leaves blank white rectangles. (AdBlock Plus has lots of complex and even site-specific CSS code to do this.)

(I've been told this by one of the Tracking Protection developers, though I may have got the details slightly wrong.)

In testing done by its developers, it speeds up the load time of the median page by 20%! So overall it gives more privacy, less page clutter, and faster browsing. Fantastic stuff.

What's funny is when you take the time to ensure than your layout will reflow nicely with ad blockers.. actually having the empty spaces is a bit worse imho.

Wondering about catching on-error events for iframes.. or load errors, etc... that may help in detection, and reflow. I'm more concerned about things continuing to look nice with adblockers than circumventing them.

What kind of fucked up site has 10+ iframes per page, let alone hundreds? And the example site he uses takes 530megs to load even without addons. I'm sensing the issue is somewhere other than Adblock Plus.

The "fucked up" case highlights the fact that ABP injects 14,000+ CSS rules (with only EasyList) in every page and iframes on a page.

You could as well ask "What kind of fucked up add-on unconditionally injects minimum of 14K+ CSS rules per page? (assuming no iframe)".

The original point is that the approach is detrimental to Firefox the browser regardless of that stress test, and I can understand very well Firefox developers wanting to raise the issue [1], as the browser ends up taking the blame when resources are abused.

[1] https://bugzilla.mozilla.org/show_bug.cgi?id=988266

Actually, that's not crazy. Ads, social widgets (the Facebook Like button), third party comment boxes, etc. all render in iframes.

No, they may render in iframes; iframes are certainly not a requirement for any of those features, and some (the original commenter included, I suspect) might consider them a heavy-handed approach to the problem.

iframes are the only unit of isolation on the web. Unless you want the like button you're hosting to have complete unrestricted access to your application's private data, then yeah, the like button needs to be in an iframe.

What's wrong with a simple link? I know facebook doesn't want you going down that route, but there's nothing to stop you.

The Facebook like button tells you when you've already liked a page. It can also show you how many likes a page has, which a simple link cannot do.

The like button is just one of many of Facebook's components which can be embedded into pages; another being the comment box which shows your name and display picture but cannot allow the hosting page to get at that information unauthorized.

Well there are ways of presenting a personalised link, and a link containing a total number, without resorting to iframes, or even client-side code. I'm not seriously suggesting they be used, merely pointing out that the multiple-iframes functionality is not a default requirement of every page on the web, as the article suggests. Some studies have shown that articles with facebook like buttons receive fewer likes than those without.

FWIW, on a site I work for, we use a plain facebook like link without any personalisation because that's all we require, and we recognise that it respects our visitors' privacy more than the full-on iframe variant.

I don't want any "like" buttons.

I don't particularly care for them either, but sadly, the market has spoken.

My current favorite solution for blocking the more annoying ads and increasing security while preserving a low-latency browsing experience: Click-to-play for Flash Player (and all the other plug-ins).

There are lots of gray boxes now all over the web, but I prefer them over resource-hungry attention-grabbing Flash ads.

It's amazing how well this improves the experience of using the internet with such a small change.

Rarely there are sites that hide their flash elements if they aren't loaded properly, which can make it difficult to click them, but then you just whitelist the website if it's really important.

I switched to this as well. I was running into problems with pages refreshing flash video ads causing memory to leak quite badly if a page was open too long. Once i switched flash to click to play, the problem went away.

I use a modified hosts file instead which is much better. See http://someonewhocares.org/hosts/ Remember the web is pull not push.

Hosts files only work when the ads and other trash are not served from the same domain, and of course the bigger operators do everything they can to make you lose some critical functionality if you block their ad serving IPs.

So you'll need to go to the URL level at a minimum if you don't want to use some important functionality.

I never lost functionality on a site because of hosts file blocking of ads. And that is together with NoScript

Actually this very rarely happens.

I a DNS server on my router which has zone that routes all ad hosting & other wanted stuff to an IP which is then rejected by the firewall.

I also have a transparent proxy rewriting all web pages removing IFRAMEs - this does ocassionally break things, but it's extremely rare to find a site that actually has a use for them other than serving ads.

Both the DNS and the transparent proxy sound like an interesting way to improve the web at home (I'm thinking specifically of an iPhone on my WiFi) -- do you have more information about how you did these things?

I use a chrooted instance of Bind as it's a LAN only dns server, /etc/bind/named.conf includes:

    include "/etc/bind/adblock.conf";
That file is generated by a script that uses a hosts file maintained on http://someonewhocares.org/hosts/ the script is something like:

    cat /etc/bind/adblock.conf | xz -z - > /etc/bind/adblock.conf-$(date "+%Y%m%d-%H%M%S").xz
    echo "" > /etc/bind/adblock.conf
    curl -o - http://someonewhocares.org/hosts/ | sed -rn 's:^127\.0\.0\.1 ([^ #\t]+).*$:\1:p' > /tmp/addrs.txt
    cat /tmp/addrs.txt | while read line; do
      ! egrep -i $line /etc/bind/whitelist.txt >/dev/null \
        && echo 'zone "'${line}'" IN { type master;notify no; file "/etc/bind/pri/adblock.zone";};' >> /etc/bind/adblock.conf
which can be called from cron or similar (if you do you need to reload/SIGHUP bind to reload its condiguration) you can whitelist stuff by adding a FQDN to /etc/bind/whitelist.txt

The file /etc/bind/pri/adblock.zone contains something like:

    @  1        IN      SOA  localhost.   root.localhost. (1000 7200 120 1209600 3600) 
    @  259200   IN      NS   localhost. 
    *  259200   IN      A    X.X.X.X
    @  2        IN      A    X.X.X.X
where X.X.X.X is an IP on different (but private and not internet routable) subnet, and iptables rules something like:

    iptables -N DNSBLACKHOLE
    iptables -A DNSBLACKHOLE -j LOG --log-prefix "DNSBLACKHOLE ::" 
    iptables -A DNSBLACKHOLE -j REJECT
    iptables -A OUTPUT -p all -d X.X.X.X -j DNSBLACKHOLE
    iptables -A FORWARD -p all -d X.X.X.X -j DNSBLACKHOLE
Transparent proxying is accomplished by iptables rules redirecting port 80 and 443 through SQUID which essentially performs a MITM, you can find out how to do this here:


Edit: it's also worth mentioning I transparently redirect all DNS traffic the router sees to my own bind instance, so untrusted devices are unable to use an alternative dns server.

Thank you very very much for taking the time to write this up!

Isn't using 200MB for a webpage(techcrunch) actually bad in the first place ?

Do all designers work on their iExpensiveMachine and don't care about other peoples lower-end machines/phones/tables/whatever?

this is mainly due to having many images on your website (memory can store uncompressed images to save CPU cycles when rendering)

Also, last I checked, most phones have 1 to 2 gigs of RAM, and they're not keeping many tabs in memory. If the RAM is there, using it is not really an issue (until you start getting into the whole virtual memory stuff I guess)

> this is mainly due to having many images on your website (memory can store uncompressed images to save CPU cycles when rendering)

If your webpage has that many images, you need to redesign your webpage. An uncompressed image at my screen resolution is 21MB - your webpage needs ten times that in memory? For maybe 500 words of prose and some meme/cat picture?

Modern web design is just so bad that they can't help themselves from this madness. A modern webpage needs 10+ iframes? Absolutely bullshit.

Well, considering I work at a car classifieds site, and there are usually about 20 photos that may be on any given page, and in the new search boxes will be even bigger, and with retina screens wanting 2x images, I'd say yes.. there are sites that really need that much space for images.

Not that all or most do.. but there are a lot of really nice sites that use a lot of large images for full content display. Other techniques can be used to reserve space and load when a section comes into view, but that's not always prudent.

Images are crucial, and optimizing your rendering is also becoming more crucial.. just the same, not everything on the web is text.. and I'd say people spend more time on the web looking at pictures than text, not to mention video.

Well considering you're an outlier, I probably shouldn't waste my time replying, but because you felt the need, I will reciprocate.

The average web page is what we're talking about here. Even your page which is demonstrably unaverage should not be hundreds and hundreds of megabytes of raw images.

Images are crucial, but running a car classified site, you should know how to properly demand load images and not just have the page load every image unscaled as soon as you hit the page. Thumbnailing was properly figured out in the 1990s, we've only added fanciness to it over the intervening decades. And even at "retina" sizes, thumbnails are a pittance in the memory budget for a webpage - if you went nuts and had 640x480 "retina thumbnails" for 20 cars, that's still only 24.6MB uncompressed. Feel free to rerun the math with your own numbers on your own time.

Since it needs repeating, we're talking about the average webpage coming in at 200MB. Give yourself some logos and a few other UI images and you're still talking nowhere near 50MB of decompressed images on the page. Yet, that's only a quarter of the page's size in memory. Somehow the DOM, Javascript engine, iframes and UI element layout are costing the other 150MB. And that's where I call bullshit. That's how nasty and tangled and batshit insane modern web design has become.

And we're not discussing video here at all, since video is probably one of most insane things about the modern web: either you're forced to use Flash which is basically like running an entire second browser rendering engine inside of your browser, just to download, decode, and play some video, or you're lucky and can use HTML5 at which point the overhead beyond audio/video decompression buffers (which people will be doing in Javascript soon enough, yay!), the setup for the OS's multimedia engine, and a small bit of DOM is inconsequential in comparison to the video stream itself. This makes the amount of space video takes on the client at best unpredictable and at worst, terrible to think about.

Every iDevice other than the iPad Air 2 has only 1GB of ram, and that's an issue for them (source: search every mention of the iPad Air and RAM, especially since the Air 2 came out).

There's a couple inaccurate things in that article that stood out at me. It should be pretty easy to measure the CPU hit when running ABP. It looks like the author is running windows so he should be able to use perfmon. He also mentions that "As with all proxy servers, though, the one caveat is that it doesn’t work with HTTPS connections" which is very much wrong.

Here is the real deal if you didn't like the blogspam: https://blog.mozilla.org/nnethercote/2014/05/14/adblock-plus...

Also, the article's claim that most pages on the web make use of several iframes is laughable conjecture. Using their own site's poorly put-together home page as an example does not prove their point. And claiming that all free content on the web only exists because of advertising is disingenuous, to say the least.

True enough.. most iframes these days are ads.. which ABP blocks.. and the majority of the rest seem to be social widgets which are nearly as bad... I hate them all myself.. though I get why they may be wanted.


Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | DMCA | Apply to YC | Contact