Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Maybe I should write one.

I wrote AdLimiter, (adlimiter.com) which eliminates certain ads from Google search result pages. It's really a demo for our site rating service, SiteTruth,but it has the internal machinery to find and remove ads. The basic idea is that it finds links to sites in the DOM, and works outward in the DOM to find the ad boundary. Then, if analysis of the link indicates the ad should be deleted, the offending section is deleted from the DOM. It takes one linear pass through the DOM to find ads. If the page changes, five seconds after the changes quiet down, another pass is made. This approach is reasonably general and requires little maintenance.

I once looked at AdBlock's code. Internally, AdBlock makes heavy use of regular expressions and does a lot of searching. It seems to be doing more work per page than should be necessary.

In some ways, Ghostery is more useful than AdBlock. It blocks most trackers, which reduces network I/O. Some ads disappear once their tracker is disabled. (CBS TV shows play without commercials if Ghostery is running.)

I've been toying with the idea of an ad blocker that uses simple machine learning. All content coming from off-site links gets a light grey overlay. If you click on the grey overlay, it disappears so you can view the content, and the off-site link is rated as less spammy. If you ignore the overlay, the off-site link is viewed as more spammy. The grey overlays gradually get more opaque over areas where you never remove them, and when they go fully opaque, the covered content is deleted completely.



Loading all content and placing overlays are precisely the reasons Addblock plus hogs so much RAM, as opposed to simply not loading the content.


There are two kind of filters: cosmetic ("element hiding") and network filters.

Network filters = to prevent the fetching of remote resources.

Cosmetic filters = to prevent portion of the DOM to be visible.

Adblock won't load any content when filtered through network filters, the requests to the remote server won't even be made.

The problem the article refers to is related to how cosmetic filters are implemented in Adblock. And that problem has nothing to do with "placing overlays", whatever that means.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: