With Chrome extension Manifest V3 migration, Google aims to fix the long existing performance and security issues of the previous extension architecture. In this blog we will discuss the benefits, migration methods and the future of the extensions scene. Let’s get started!
Chrome extension Manifest V3 migration has been a priority task for businesses trying to enhance the performance and security standards of their browser plug-ins lately. Google announced this monumental change for their extensions all the way back in November 2020, and it has been the watercooler conversation for almost everyone involved with Chrome extension development eversince. While some welcomed the changes with their arms wide open, some questioned the restrictions placed by the new guidelines.
On the flipside, while the community was busy evaluating the changes introduced with the new manifest version, Google hinted towards an ultimatum for the users planning to not comply with the changes. Announcing a complete phase-out plan for the Manifest V2(MV2) extensions from their web store by 2023. Which means, if you have an extension that still runs on MV2 then time is of the essence. Don’t worry though, BinaryFolks’ team of exceptional Chrome extension developers are here to help you out! How? Read along.
Previously, Google allowed extensions to modify the browser configuration according to their needs without any consequences, leading to a decline in the security standards of the browsers. On top of that, the previous manifest version(Manifest V2) allowed extensions to interrupt the network requests which led to process slowdowns across primary browsers including Firefox, Microsoft Edge and even Chrome.
As extensions migrate to Manifest V3(MV3), Google aims to resolve the above issues for good and provide users with a better browsing experience. But, as users delved deeper into the guidelines, a common concern began to emerge within the community. The implemented changes posed a potential risk of rendering entire categories of pre-existing Chrome extensions useless. Here’s a list of extension categories under risk -
When it comes to comparing Manifest V3 to its previous version, there are a lot of new features and enhancements that make the new extension architecture an undeniable improvement towards the productivity and reliability of Chrome extensions. Let’s discuss them in detail -
With businesses speeding up the Manifest V3 migration for their extensions, the number of fraudulent and malicious extensions actively listed on the Chrome web store is expected to observe a promising drop. Google updated the ‘declarativeNetRequest’ API alongside manifest.json file as a feature that replaced the old ‘webRequest’ API that allowed extensions to interfere and alter network requests made by websites. With Manifest V3 a new rule-based approach was established for websites which limits the authority of extensions to modify a network request. Allowing the extensions and browsers to operate within the pre-established guidelines makes the entire experience feel secure.
Manifest V3 migration for Chrome extensions allow browsers to perform more optimally by using ‘declarativeNetRequest’ and ‘chrome.action’ APIs to manage and process multiple network modification requests more effectively. This allows the browser to save time on each request, speeding up various operations for the browser.
Previously background pages were used to handle these operations. But the major issue there was the fact that it had to run a code that was required to execute continuously. And, this code shared the same memory that the extension was using. However, Google announced the service worker model which runs in a different process, allowing the extension to operate freely. This further enhanced the performance of the extension and the browser altogether.
Manifest V3 extensions are built to establish a more consistent user & developer experience across all browsers. This was made possible by the use of the ‘webExtensions’ API which is compatible with most of the popular browsers and allows the developers to build the extensions for them using a common set of APIs. This solves one of its predecessor’s primary issues, Manifest V2 extensions had slight inconsistencies and variations when it came to being used in different browsers. This forced the developers to make alterations to the code every time they wanted to add a new browser to the extension’s roster.
Additionally, we can’t expect browsers to remain the same forever right? As the web standards & guidelines continue to evolve with time, so will the architectures and security measures of the browser. If these standards are not maintained, your extensions stand at the risk of being removed from the store completely. Fortunately, Manifest V3 was developed keeping these concerns into account, this makes extensions that follow its guidelines relevant even after any basic changes in the near future.
Migrating to Manifest V3 provides your extension the ability to follow a model which is similar to an event-driven architecture. Now the advantage of having this architecture is that it provides in-depth control over how the extension interacts with the browsers. Service worker models play a major part in implementing the event-driven programming model for Manifest V3.
In addition, the ‘declarativeNetRequest’ API provides the users with extra controllability over the modifications an extension makes to a browser. The extension developers are asked to justify their requirements for every sensitive permission which is analyzed by the browser platform. This puts the browser back on the driver’s seat allowing them to take control of the changes, instead of the overruling extensions.
We follow Google’s official Chrome Developer’s guide for migrating your extension(s) to the new and improved Manifest V3 version. Our developers make sure to comply with every little instruction mentioned, making them future proof. This also gives your extensions the compatibility to get featured on the web store which can be a huge plus for your extensions future.
In addition to complying with the official documentation, we take a few additional steps to make sure the extensions migrated/developed perform without any issues in the future. In order to achieve that, we -
With all the benefits and security protocols covered, it’s time for us to start migrating our extension. Here’s a step-by-step guide to help you seamlessly migrate your extension into the latest Chrome extension’s Manifest V3 -
The initial step while migrating your extension to Manifest V3 would be to make a few important changes to the manifest file of your extension. Here are the key changes you need to make -
One of the major performance enhancements during Manifest V3 migration is the switching of background pages into service worker models. These models execute the background code in a different location, providing the entire memory to the browsers. It also enables offline usability for the extension up to some extent. Here’s how we implement these service models, we -
During Chrome extension Manifest V3 migration there are a significant number of APIs that need to be replaced. Either because there is a better alternative available for them, or they are simply not supported in the newer version of Manifest anymore. Let’s go over these API changes briefly -
For more details, check out what Chrome Developers have to say about - Updating API calls
With the “declarativeNetRequest” API the extensions are able to make reasonable changes to the browser or block unwanted content without accessing any sensitive user data. This significantly improves the security standards & performance, reflecting a positive user experience. Here’s a quick look at how we upgrade the old content blockers, we -
Here are a few common use cases where “declarative_net_request” is used to block unwanted resources from accessing your browser/ personal data -
When it comes to improving security protocols, Manifest V3 has really elevated the standards by a promising amount. It introduces a few operational and policy changes that make using extensions of this newer generation much safer. Here’s how we update the security guidelines for Manifest V3 -
Although Google has not announced the official shutdown date for the Manifest V2, it's coming really soon. Recently, Chrome Web Store stopped accepting manifest V2 extensions with their visibility set to public, and announced that they will be switching all the pre-existing ‘public’ Manifest V2 extensions to ‘unlisted’.
Simultaneously, Google has been encouraging users to start migrating their Chrome extensions to Manifest V3. By announcing that Manifest V3 will become a prerequisite for Chrome extensions with a featured badge as they look forward to improving the security standards of the extensions they showcase on their store.
After looking at the current state of Manifest version 3, you probably understand how the dynamics of Chrome extensions are gradually shifting towards a safer and much more productive experience for the users. Now, the question remains, what’s gonna be your approach towards managing your extensions? You can make one of the following choices -
If you’re planning to stick to the Manifest V2, it is most likely gonna be a rocky road. Since Google announced that although they will support Manifest V2 extensions for the “foreseeable future”, their primary focus is going to be on the development of Manifest V3.
Alternatively, if you are planning to migrate your Chrome extension to Manifest V3, or develop a Manifest V3-based extension from scratch, but are clueless about how to start either of them. Then you’re at the right place, BinaryFolks’ Chrome extension developers are here to help you out!