How does Adblock Plus really work in Chrome?

后端 未结 3 1816
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-02-02 01:03

I noticed Adblock Plus injecting some CSS that hides the advertisements, but I think that it does more than that - for example blocking HTTP requests.

How does Adblock Pl

3条回答
  •  闹比i
    闹比i (楼主)
    2021-02-02 01:30

    Adblock Plus has two mechanisms, to block content on websites:

    Element hiding: A CSS snippet is injected in the website, to hide elements that are supposed to be blocked. That way the ads are completely removed from the rendered page, so that the areas otherwise used for ads will now be used for the actual content of the web page, and even content that is part of the web page itself (like text ads) can be blocked. However this doesn't prevent resources from loading in the first place.

    Request blocking: HTTP requests for retrieving resources that are supposed to be blocked will be prevented from loading. This will make the page load faster, reduce traffic, and even enables blocking content that is loaded from within Flash, like the video ads on YouTube.

    Both, the elements to hide on given websites, and the URLs to block, are controlled by filter lists. By default Adblock Plus will use EasyList. But you are free to setup your own filter rules or configure other filter lists.

提交回复
热议问题