What are WebExtensions and why do we need them? In mid-2015 Mozilla announced a big change to Firefox add-ons. This marked the start of the transition to WebExtensions - a new API (Application Programming Interface) for extension authors. The plan ...
Find out more
Firefox Focus - a new take on private browsing This is a new kind of mobile browser. It’s for people that are conscious about privacy and security on the web. There’s been a lot of talk about these issues in the past - corporations ...
Find out more
Firefox 57 becomes Firefox Quantum For a long time Quantum was the code name for the upcoming revolutionary version 57, but the name Firefox 57 just doesn’t do justice to the momentous changes that are coming in November. So, ...
Find out more
Firefox 56 released. Find out what’s new! Version 56 of our favorite browser is live. It is the last version before the revolutionary version 57 which will bring all sorts of performance improvements and a clean break to web extensions. ...
Find out more
Oct
08

What are WebExtensions and why do we need them?


In mid-2015 Mozilla announced a big change to Firefox add-ons. This marked the start of the transition to WebExtensions - a new API (Application Programming Interface) for extension authors. The plan was that one day this way of writing extensions would be the only way, making the old extensions incompatible with Firefox. That day is right around the corner. On November 14th, Firefox Quantum will ship with only WebExtensions. Considering that for a long time extensions and extensibility in general were the big selling point of Firefox it might seem like an extreme measure from Mozilla to cut the branch they’re sitting on, especially in a time when their market share is being gobbled up by Chrome.

So, why would they do that? What was so fundamentally wrong about the old extension system that it had to be completely replaced? Well, usually when developers add extensibility to one of their apps they usually create an abstraction layer that sits on top of it where other developers have certain points they can plug into (hence the name plugins). This is basically how WebExtensions work - they do their thing and when needed they interact with Firefox in very specific points based on their needs and permissions. This allows the browser to keep them contained and away from its core resulting in increased security and performance.

Old Firefox extensions

The old extensions did things a little differently. There wasn’t an abstraction layer to speak off. Extensions simply plugged into the browser. The upside was that extensions were powerful because they could plug into anything becoming a piece of the browser itself. The downsides were plenty. First of all, browser updates could break extensions, because their points of interaction would change without notice. Second of all, it was a security nightmare because malicious extensions could compromise the whole browser since they had access to its core. Third of all, making significant performance gains was very hard because they had all these pieces of external code they had no control of. So, even if it seems that Mozilla was caught between a rock and a hard place, really they had no choice but to move on and bite the bullet, rather than slowly fade into irrelevance because of questionable performance and security.

Firefox WebExtensions

It’s also no coincidence that the WebExtension API is the same that’s used by Google and even Edge. Since Firefox is no longer among the dominating browsers it’s unreasonable to expect developers to write an extension specially for it, so the new system helps because extensions for different browsers share 95% of the code, making porting between them a breeze.

For now, some developers are hard at work converting to the new API, but not all, so when Quantum launches there will be some functionality missing. This is partly because WebExtensions are not as powerful as the old extensions and Mozilla hasn’t yet implemented all the APIs supported by Chrome, although they’ve implemented a whole lot of them and are hard at work filling the gaps.

To sum it up, Firefox Quantum will be a bitter sweet experience. There will be some things missing here and there, but hopefully the lightning fast performance and slick new UI will make up for the initial shortcomings. I have no doubt that during the next releases a lot of kinks will be ironed out and things will returned to mostly normal during the first post-Quantum releases.