Conceptually how do ad-blockers detect third party scripts? Is it a reverse firewall, or do they read all of the incoming code when a page is requested? or something else?
Asked
Active
Viewed 215 times
1 Answers
-1
In the case of Adblock Plus it checks whether the requesting host has the same base domain as the requested host by comparing the two URLs that the browser provide when a new request is being made.
Source:

greiner
- 586
- 2
- 11
-
**Maybe in the past**, and until recently (1/2 year ago) in Chrome. **Now Days** (and for Firefox, for the past 8 years) - **AdBlock hooks the network API of the browser**, killing connections very early in the page life-cycle (if any!). Some hiding rules naturally are not requiring such methods, but as for 3'rd party resources, that's the way now days.. I could reference this the adblock GIT||SVN, but [..give a man a fish](https://en.wiktionary.org/wiki/give_a_man_a_fish_and_you_feed_him_for_a_day;_teach_a_man_to_fish_and_you_feed_him_for_a_lifetime) ;) – Jan 17 '16 at 11:18