462 points · by Black101 · 5y ago · 178 comments
- Consumer web browsers (1993-)
- Plug-ins (1995-2015ish)
- User Style Sheets (1998-2019)
- Bookmarklets (1998–)
- Browser Extensions (1999–)
- Mozilla XUL (1997–2017)
- Alternative Browser Distributions (2004–)
- Userscripts (2005–)
- Converging on the WebExtensions API (2017–)
- Manifest V3 (2021–)
- No/Low-Code Browser Extension Builders (2021–)
Here's a link to the blog post with my research: https://medium.com/brick-by-brick/a-brief-history-of-browser...Also, if you care about browser extensibility, join the w3 group (it's free) and watch the GitHub repo!
- webextensions specific storage apis to return promises but chrome still needs callbacks
- A few UI differences between chrome's extension popup and firefox's one means you'll need to potentially leave out features for one browser.
- csp policies differs between chrome and firefox(and cors too I think)
- UX differences between browsers means you'll need to write extra code, and maybe a few extra tutorials.
- Difference between how permissions are interpreted on different browsers
- Huge huge difference between publishing on chrome vs on firefox
- Safari requires xcode, and therefore macos to publish
>
“A few UI differences between chrome's extension popup and firefox's one means you'll need to potentially leave out features for one browser. - UX differences between browsers means you'll need to write extra code, and maybe a few extra tutorials. - Huge huge difference between publishing on chrome vs on firefox - Safari requires xcode, and therefore macos to publish”
Bottom line is I don’t think there is going to be an api standard around “distribution and publishing areas”
Plus, you probably still need a Mac or a virtualized Mac (for automated tests, for example) because you’ll want to test your extension with Safari to ensure it works correctly.
Firefox also provides a polyfill to adapt the Chrome API to the WebExtensions standard.
More info here: https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/Web...
Chrome published the WebExtensions API, not Mozilla. Whether or not it’s a standard is another question, you could call it a defacto standard, but Chrome definitely implemented the api that they published.
[1] Extensions can change it, but they don't take effect until the tab for current page has loaded, which often defeats the purpose.
Mozilla make money from Google deals and so have outside incentives to not rock the boat too hard on this detail.
The goal is deprecation of "remote code" execution, where "remote" means remote to Vendor, but local to user, aka anything not shipped and signed by the extension store.
“Style sheet
To use your own CSS instead of webpage style sheets, click the pop-up menu, then choose Other.”
?The WebExtensions API has APIs for injecting styles: https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/Web...
But I also think its interesting to note how browsers became suits including a chat and mail client (protocols such as POP3, SMTP, IMAP, NNTP, IRC, FTP, etc) to focusing on WWW only (HTTP). Heck at some point browsers even had LDAP support for things like bookmarks and settings.
I’m still using them.
https://en.wikipedia.org/wiki/List_of_Internet_Explorer_add-...
There's an open bug in Firefox about this (because it doesn't follow the spec): https://bugzilla.mozilla.org/show_bug.cgi?id=866522
And as far as I can tell, they should be. They're a natural intermediate step between nothing and extensions, and there's not really security problems they have that extensions don't.
If there's a problem here, it's that browsers (some, at least) aren't following the spec.
Something I'm not clear on is whether the CSP spec says it shouldn't apply to any bookmarklet or if it only shouldn't apply to bookmarklets that don't request resources from other domains. That is, CSP shouldn't prevent a bookmarklet's own code from doing things like adding/removing attributes to elements but if the bookmarklet tries to load other files (more JavaScript, CSS files, images, etc.) then the page's CSP should apply.
To me, if a browser extension can run, a bookmarklet should also be able to run; a difference is the bookmarklet will only run once when it's clicked and will always clear from memory when a new page is requested.
Both extensions and bookmarklets pose some risk to the user but it's a worthwhile trade-off. If bookmarklets started to become a problem (remote resources being replaced will malware), maybe restrictions would be necessary, like all links to remote resources requiring valid subresource integrity hashes.
[0] https://en.wikipedia.org/wiki/Stylus_(browser_extension) [1] https://userstyles.org
And the twitter announcement from the co-chair: https://twitter.com/xeenon/status/1400862543673921536
I'm cautiously optimistic that this will work well, but somewhat concerned that this will cause Manifest V3's de facto limits on ad blocking and the like to become endemic. It will be interesting to see how they balance "compatibility with popular existing extensions" against their foundational focus on security and privacy.
This is a good move and something we’ve been moving towards for years, but it is still nice to see. Extensions are often one of the biggest barriers to browser lock-in on the desktop and making it easier for devs to build extensions that can reliably work across browsers, the better it will be for users.
Obviously, the individual browsers will stink have their own specific ways of doing things, but this is a positive development.
And you still have to paid $99 /year to publish or get it to work on Safari.
Edit: Less Rant-ish.
[1] https://9to5mac.com/2021/06/04/apple-teams-up-with-google-mo...
[2] https://www.cnet.com/news/chrome-safari-firefox-and-edge-joi...
After all what's their angle here? Almost every browser extension under the sun has a Chrome version due to its immense market share. It seems like a good way for them to later potentially push for changes that would make, say, ad blocking easier (under the guise of performance or some such).
I consede that it's a bit tinfoil-hatty, but I have very little faith in Google these days.
WebExtensions were already practically required to be a superset of Chrome's APIs, so the incentive is already there to just use what Chrome offers for maximum compatibility. Mozilla can and does offer additional APIs beyond what Chrome does, and in some cases (like adblocking in a manifest v3 world), this will soon be more relevant as Chrome's adblocking capabilities will take a hit upon killing manifest v2, but it's already the case that Firefox is a better platform for adblockers, as detailed by uBlock origin devs: https://github.com/gorhill/uBlock/wiki/uBlock-Origin-works-b...
I don't see this group constraining vendors to implement _only_ the blessed APIs, much like web standards hasn't stopped Chrome inventing new APIs for Google needs.
[meta] Deprecate background pages in favor of service workers: https://bugzilla.mozilla.org/show_bug.cgi?id=1578286
To me, it is fascinating, and terrifying, how quickly narratives change and people seem to take that vhange in stride.
Admittedly, it does not help that I am now watching mr robot.
https://github.com/kiwibrowser
https://play.google.com/store/apps/details?id=com.kiwibrowse...
I worked with them to get the BeeLine Reader extension available on their browser, and now Insight is my go-to mobile browser.
Lots of social integration (like payments) but really there hasn't been any real technical innovation for about a decade.
Google is Microsoft in the 90's when it comes to the browser but sadly there is no one to stand up to them like Mozilla did to MS/IE.
For instance Manifest V3 would mean the end of uBlock Origin and other content blockers if Mozilla follow Google's implementation exactly, and whilst they've said recently they're not intending to deprecate the content blocking APIs this isn't a long-term certainty especially with this new conformity group arising.
What's the difference between an 'extension' and a 'plugin' in your eyes? These words seem semantically indistinguishable.
"Extension" generally refers to code given limited access to certain APIs, a bit more generous than the access given to an individual web page but much closer to that model. Extensions are usually written with web languages like JS and HTML.
The multi-decade security trainwreck that was Flash was possible because it was a plugin - both in that bugs that corrupted the code could let an attacker run unrestricted code on your machine as if they'd gotten you to run a malicious application, and in that Flash was on its own for implementing rules like "can this website download files from this other website," so it was often possible to break the web's security model via Flash. Extensions go through the browser core to do all their work, just like JS on a website.
Conversely - Flash allowed doing a whole lot of cool things back when the web platform was nowhere near as capable. An extension can't directly access, say, the clipboard; it has to go through a browser API to do that. But back when there was no browser API, Flash could access the clipboard just like any other program on your computer.
But I think that may be largely an after-the-fact rationalization (like retronyming "YAML" from "Yet Another Markup Language" to "YAML Ain't Markup Language") and it's mainly a historical artifact that two different generations of browser extension technology have different names, because they're not precisely mathematically defined categories of computer science.
At the time that NSAPI came around, JavaScript wasn't really much of a thing, and DHTML didn't exist, so not many people would have seriously thought of actually writing practical browser extensions in it. JavaScript was first thought of more as a way to wire together plugins, not implement them. You were supposed to use Java for that. To that end, Netscape developed LiveConnect.
Microsoft eventually came out with "ActiveX Behavior Components" aka "Dynamic HTML (DHTML) Behaviors" aka "HTML Components (HTCs)" that enabled you to implement ActiveX controls with COM interfaces in all their glory and splendor, entirely in Visual Basic Script, JavsScript, or any other language supporting the "IScriptingEngine" plug-in interface, plus some XML. So you could plug in any scripting language engine, then write plug-ins in that language! (Easier said than done, though: it involved tons of OLE/COM plumbing and dynamic data type wrangling. But there were scripting engines for many popular scripting languages, like Python.)
https://en.wikipedia.org/wiki/HTML_Components
https://docs.microsoft.com/en-us/previous-versions//ms531018...
http://lua-users.org/lists/lua-l/2007-03/msg00047.html
LiveConnect:
https://techmonitor.ai/techonology/netscape_ships_liveconnec...
NETSCAPE SHIPS LIVECONNECT BETA. By CBR Staff Writer 30 May 1996.
>Netscape Communications Corp, Mountain View, California, this week released its LiveConnect SDK development kit in beta which enables live objects in Web pages – such as Java applets, JavaScript scripts and plug-ins – to communicate with each other. Netscape will deliver a pre-release version of Java user interface component and application programming interfaces acquired through its acquisition of Netcode Corp earlier this year. Netscape will release a beta version of its Java-enabled Navigator 3.0 client for Windows 3.1 in June.
http://medialab.di.unipi.it/web/doc/JavaScriptGuide/livecon....
Chapter 5. LiveConnect
LiveConnect enables communication between JavaScript and Java applets in a page and between JavaScript and plug-ins loaded on a page. This chapter explains how to use LiveConnect in Netscape Navigator. It assumes you are familiar with Java programming.
Use JavaScript to access Java variables, methods, classes, and packages directly.
Control Java applets or plug-ins with JavaScript.
Use Java code to access JavaScript methods and properties.
For reference material on the Netscape packages, see the JavaScript Reference.
For the HTML syntax required to add applets and plug-ins to your web page, see the Applet and Plugin objects in the JavaScript Reference.
For information on using LiveConnect with server-side JavaScript, see Writing Server-Side JavaScript Applications.
For additional information on using LiveConnect, see the JavaScript technical notes.
Extensions or Add-ons running with WebExtensions API are HTML/JS/CSS and have way less access to your machine. They run in a sandbox with very specific fine-grained control over permissions and capabilities.
Browser extensions refer to more recent JavaScript centric extension techniques (like the older Firefox XUL extensions, and more modern Chrome/etc extensions), using JavaScript as a browser extension language, throwing in some XML and CSS, and coding most if not all of the plugin in JavaScript, instead of linking compiled binary code.
Python makes a distinction between "embedding" and "extending", that doesn't map directly into the browser plugin/extension dichotomy, but is kind of similar -- it's a question of "who's on top", and embedding usually implies some extending:
https://www.oreilly.com/library/view/python-in-a/97814919138...
Extending Python means building modules that Python code can import to access the features the modules supply. Embedding Python means executing Python code from an application coded in another language. For such execution to be useful, Python code must in turn be able to access some of your application’s functionality. In practice, therefore, embedding implies some extending, as well as a few embedding-specific operations. [...]
https://docs.python.org/3/extending/index.html
>This document describes how to write modules in C or C++ to extend the Python interpreter with new modules. Those modules can not only define new functions but also new object types and their methods. The document also describes how to embed the Python interpreter in another application, for use as an extension language. Finally, it shows how to compile and link extension modules so that they can be loaded dynamically (at run time) into the interpreter, if the underlying operating system supports this feature.
Another way to think of it is something you just plug in and use, like a vacuum cleaner. But an extension needs access to the browser API and may entangle itself.
I'm sure there are exceptions to those boundaries, such as Javascript being enabled to interact with Flash applications, but a plugin might operate without any real crossover with the browser functionality beyond existing in a window.
DownThenAll! (or download managers in general) are still rather severely crippled, though – they can only download into the official OS "Downloads" folder, they can't skip files that already exist in the target directory...
> Given this, we expect browser vendors to offer APIs and capabilities beyond what's specified.
"The incident is a reminder that browser extensions — however useful or fun they may seem when you install them — typically have a great deal of power and can effectively read and/or write all data in your browsing sessions."
https://krebsonsecurity.com/2020/03/the-case-for-limiting-yo...
The decision of Google to build RSS support in Chrome is also part of the same plan. Now you don't need an account on TW, FB to follow someone's blog.
By stopping supporting these kind of security holes internet would be better place.
If they are serious about this then is this the first step towards extensions on mobile?
This isn't far fetched at all - It is already the most crippled in Google's and Microsoft's browsers and partially crippled in Apple's Safari. And note that all three tech giants browser harvest your personal browsing data as all three of them also run an advertising network.
Mozilla would easily be outvoted by these three on any decision making. (This is ofcourse disregarding the fact that Mozilla already does Google's bidding). The decision that Mozilla makes here will dictate their future - if they cripple their extension api any further, Firefox will be done for as many users will abandon them in huge droves.
As someone on slashdot commented, "There's enough evil here to really do some damage and screw us all over.".
Firefox has little incentive to nerf ad-blockers, unlike Google. And Google can't flex their default search engine payments to Mozilla without walking into the anti-competitive arena.
(^ donations to the Mozilla Foundation do not fund Firefox development!)
Also this standard refers to add-ons/extensions, and not "plugins". Browser plugins are dead, and have been for a while.
Browsers started dropping support for plug-ins around 2015. However, plug-ins actually held on longer than you might think. Firefox didn't completely drop support for Flash until the beginning of this year
Fixing security issues when they stem from the browser running arbitrary machine code directly in its address space is several grad-student-years worth of computer science theory and may very well grind up against known-unsolvable problems like the halting problem. Purely hypothetically, you could approach it via solutions such as running a virtual machine inside the browser, but now your browser is actually a virtual machine that happens to connect to the internet. As if browsers weren't already heavyweight and complicated enough. ;) In practice, Firefox and the other browsers on the market didn't do that, and sometimes plug-in code would just crash and take your whole browser down with it. No fun, no fun at all.
In contrast, extensions run on top of the JavaScript sandbox and can only interface to the browser via the JavaScript-accessible API. The whole extensions framework piggybacks on the security work already done to allow untrusted JavaScript code from arbitrary websites to run in the browser.
First they "removed" HTTP from most of the web so you couldn't trivially intercept text data flowing between the server and your browser window. Then they removed the ability to run code natively in the browser process that allowed the possibility to alter that data securely whilst maintaining HTTPS security. Next up, things like certificate pinning to prevent you as the user from tampering with the data they want your browser to show you. Then DRM will be added to the browser to start preventing you from intercepting the flow of data to your screen.
This is all happening in slow motion over decade long timescales. But some of us are starting to see how the "endgame" is aligning with the various bits they're pushing slowly over time in small increments.
This means that, apart from the (serious) security concerns, none of the behavior is standardized or manageable. How do you apply proxy configuration to a plugin that's bringing its own copy of libcurl? How do you report how much storage a plugin has used?
It's also a huge pain for people on less-popular OSes, because each plugin needs to be individually ported, even though the browser already has figured all these things out for its own use.
So, no, this isn't reinventing NPAPI. It's doing a whole lot of things that NPAPI didn't have answers for.
(Note that the headline is incorrect; the article clearly states they're talking about extensions, not plugins.)
FWIW, here's some feedback I wrote up and sent to Netscape about the original version of the Netscape 2.0b3 plug-in SDK (NPAPI), when I worked at Kaleida. This was from around 1995, when JavaScript was called LiveScript, before anything like LiveConnect/XPConnect/NPRuntime existed, when Netscape though Java was the solution to all their problems, and before ActiveX of course (but I warned them about Microsoft's use of OLE in the browser), so plug-ins only had very limited if any interaction with LiveScript and DOM.
ScriptX was a multimedia scripting language, a lot like object oriented Lisp or Python with built-in graphics and multimedia libraries. But unfortunately it was not designed to be an extension language library that could plug into another application like Netscape, the way Python does so well. So I made a "ScriptX Plug-Out" that integrated ScriptX running in another process with a Netscape plug-in via Apple Events.
https://donhopkins.com/home/archive/netscape/Netscape-Plugin...
>The plug-in interface is totally mime viewer oriented, which is very limiting, and too narrowly focused. There's no way to do background plug-ins (even though the documentation claims they're supported, there's no way to express them through the api), protocol handlers (like you can already do through the Spyglass Browser Remote Control interface, but only in another process), or embeded plug-ins that aren't viewing a file (like a QuickCam viewer plug-in that doesn't need to read a file since it gets its input from hardware, or my cellular automata plug-in which can be configured from the html embed properties, and generates animation algorythmically).
>I hope NetScape can come up with a plug-in interface that is good enough that they can implement their own navigator components with it (like the mail reader, outliner, progressive jpeg viewer, etc). The only way it's going to go anywhere is if they work closely with developers, and use the plug-in interface for non-trivial things themselves. Microsoft already has a VRML plug-in for their navigator, so presumably they have a plug-in interface, and from what I've seen on their web site, it may not be "good enough", but it's probably going to do a lot more that you can do with NetScape right now, since they're exposing a lot of their navigator's functionality through OLE. They seem to understand that there's a much bigger picture, and that the problems aren't trivial. Java isn't going to magically solve all those problems, folks.
For more historical background, here's some stuff I wrote about the browser plugin scene in 1996, including a link to a "pluggers" survey about plug-in technology that I wrote at Interval Research called "An Overview of Plug-In Technology circa March 1996", which describes and compares Spyglass's Browser Remove Control API, NSAPI, ActiveX, Java, JavaScript, etc.
https://news.ycombinator.com/item?id=19837817
https://donhopkins.com/home/interval/pluggers
https://donhopkins.com/home/interval/pluggers/navigator.html
https://donhopkins.com/home/interval/pluggers/java.html
https://donhopkins.com/home/interval/pluggers/requirements.h...
just missing those brave devs
Browser extensions should not be made an official thing. Some extensions are malicious and even legit ones have too much access to your data.
If plug-ins are made official then companies may choose to provide functionality via plug-ins instead of through regular web-based applications and that's a terrible idea.
Next if you didn't code it in vanilla js, you probably shouldn't use on your daily driver browser because of the massive security risk.
* yes, I know they only share the engine
Their member in this group, Simeon Vincent, won't acknowledge this because his paycheck requires him to not understand it. You could read the last year of the chrome extension google group for countless examples of developers raising issues with MV3 architecture only to be corporate-spoken away by the 800-lb browser gorilla. They aren't listening, but they want you to think they are.
Google does whatever it wants, whenever it wants, as poorly documented as it wants. MV3 still does not have buy-in from extension developers but Google has started the clock on MV2 deprecation. This new group is nothing more than an attempt to get Google to document loudly what they're already doing.
WebExtensions is still Google's browser API. Mozilla implemented it so they could support Chrome extensions, but they didn't inherit partial ownership as a result of that.
I also think it's premature to say it was "forced on the world" when Manifest V3 isn't even released yet.
Safari == webkit
FF == Gecko
Google == Chromium
Microsoft == Chromium
Right?
So 3 Engines?