User:SCherukuwada (WMF)/MV3

= Google Chrome, Ad Blockers, and MV3 = This page attempts to explain what's going on with Google Chrome and Ad Blockers and what the word "MV3" has to do with it. I intend for this to be a broad, non-technical explanation so If you're unable to understand what is being discussed here, please leave me a note and I'll apologize to you and try to simplify it further.

Ad Blockers and Chrome Extensions
It might be useful to understand how these two are related. Chrome Extensions are like small apps that can be used to enhance your browsing experience. You need to visit the Chrome Web Store and install them. Many chrome extensions will modify the content of the pages you view to give you a better experience. For instance, a very popular extension is the Google Translate extension, which will let you translate any highlighted bit of text in any page that you view. Another one will highlight lines in your text that look like locations and add map links to them. Yet another one will let you create TODO items out of things you see on a web page.

Ad blockers are a category of extensions. The most popular one among them is one called AdBlock. Their main function is to prevent your page from displaying ads. How they accomplish this is easier to understand if one first understands how ads are displayed on a page.

How Ads Work
When you author a web page with the intention of displaying ads on it, you choose some part of the page, likely a bar to the side, a header, or some other rectangular area that you want to fill with ads. You as the web page author have no idea which ads will show up there (because you're not going to author those ads). Instead, you embed some code in there given to you by an "ad network" (like Google AdSense, AdCash, PopAds, Amazon, etc.). Whenever your page loads, your server simply serves the page with a blank area. But the code you've embedded in that blank area then talks to the ad network and fetches an ad appropriate to your current user. In other words, your user's browser is now talking to at least two different servers - one to fetch the website the user wanted to view, and one to fetch an ad to embed in the page.

How Ad Blockers Work
There are essentially two ways in which ad blockers prevent ads from appearing on a web page.

Ad blockers have lists of servers that they know belong to ad networks. These lists are curated, sometimes by thousands of volunteers. So when your browser loads a page, the ad blocker, assuming you have installed one, keeps an eye on every request going out to a server. If any of them happen to be to known ad networks, the ad blocker blocks the request.

Sometimes, an ad blocker might not be able to recognize some ad requests as such, but they can identify elements on a rendered page as being ad sections. The blocker will then remove these sections, making them invisible. Somewhat similarly, If it looks like a page has a section containing code that will result in a call to an ad network, the blocker might block the code on that page from running or remove the section altogether.

What's MV3?
Chrome extensions don't have free reign over your browser. There are specific permissions that are requested by the extensions, somewhat akin to Android or iOS apps requesting permission to use your camera or your location. Extensions need permission to read or modify the content of a page, to block or modify requests going out from the browser, and so on. When you create a Chrome extension you end up declaring what the extension does, which permissions it needs, and what its name is in a file called a "Manifest file". The Manifest file is a part of the program code that you write when you build a Chrome extension as a developer. This has been through a few revisions as the platform evolved. The latest version that is being launched is MV3, or "Manifest File Version 3".

An ad blocker extension needs to read and be able to modify every single page you load in your browser. That's obvious, given that you probably want it to remove ads from all pages you visit. This also means that when you visit your bank's website, the ad blocker technically has access to the content on the page. That's a lot of trust.

How it Affects Ad Blockers
The mechanism that was used to block and modify all requests was called. This mechanism essentially lets the Chrome extension modify requests that go to the server, or modify responses that come back. Ad blockers use this mechanism to either ensure that requests to the ad servers were simply canceled or their responses blanked out in some way.

has been replaced by something called. The former gave extension code access to the content of every request sent by the browser to every single server. The latter is much more limited in that it allows the extension to specify a set of rules around what to do with each request without giving the extension access to the contents of each request. In other words, the rules tell the browser what to do with each request without running any extension code on the request data itself. This gives the extension significantly less access to your data, thereby reducing the risk of a compromised extension being able to see everything your browser sees.

Future?
MV3's new restrictions mean that ad blockers will need to be rewritten to be compatible. They will still continue to work. There are discussions on whether the limit on the number of rules possible in MV3 will cause a problem or whether Google will revise them. But it's important to note that this in itself is not a policy-backed move against ad blockers and simply closes what has been a large risk vector for malware attacks.

Reading Material
How AdBlock works

How AdGuard Still Works with MV3

AdGuard's explanation on how ad blockers work

Network Request Modification (Google Chrome Documentation)