flâneur — a map of the web's best reading

Youtube’s Anti-adblock and uBlock Origin - And a Dinosaur

andadinosaur.com · 1,013 words · saved by 1 readers

Recently, YouTube has been ramping up its anti-adblock effort, and I’ve been watching this closely due to personal interest. This blog post is where I write down what I know. Here’s how adblockers (used to) block YouTube ads. Before playing a video, YouTube would check its API, and the server would send back something like this: And the adblockers would override JSON.parse and Response.json to make it return this instead: This trick worked for a few years. But earlier this year, YouTube started making fake requests to see if the responses were changed. If the responses were changed, it meant the user was using an adblocker. Most adblockers stopped working, but a few like uBlock Origin and AdGuard updated their filters to avoid these fake requests. Then YouTube would update their fake requests so the adblockers would fall for them. It’s been a game of cat and mouse between YouTube and the adblockers ever since. YouTube isn’t rolling out the anti-adblock to everyone. It seems to depend o

Youtube’s Anti-adblock and uBlock Origin 29 October 2023 Recently, YouTube has been ramping up its anti-adblock effort, and I’ve been watching this closely. This blog post is where I write down what I know. Some Background Here’s how adblockers (used to) block YouTube ads. Before playing a video, YouTube would check its API, and the server would send back something like this: { " video " : " something.mp4 " , " ads " : [ ad1 , ad2 , ad3 ], " etc " : { ... } } And the adblockers would override JSON.parse and Response.json to make it return this instead: { " video " : " something.mp4 " , " ads "

Explore this link on the map →

related reading