NPAPI
Netscape Plugin Application Programming Interface (NPAPI) is a
In the NPAPI architecture, a plugin declares
NPAPI was frequently used for plugins which required intensive, low-level performance such as video players, including
NPAPI support among major browsers started to wane since 2015 and it was gradually deprecated over the following 7 years. All major web browsers have removed support for 3rd party NPAPI plugins for security and maintenance reasons.[1]
Scripting support
Scripting is a feature allowing JavaScript code in a web page to interact with the plugin. Various versions of Netscape and then Mozilla supported this feature using different technologies, including LiveConnect, XPConnect, and NPRuntime.
LiveConnect
LiveConnect is a feature of Web browsers that allows Java and JavaScript software to intercommunicate within a Web page. The first version of LiveConnect was built by an intern graduate student at Carnegie Mellon University (CMU).[2] From the Java side, it allows an applet to invoke the embedded scripts of a page, or to access the built-in JavaScript environment, much as scripts can. Conversely, from the JavaScript side, it allows a script to invoke applet methods or access Java runtime libraries as much as applets can.[3][4]
LiveConnect was used in
The
The Java–JavaScript functionality supported by the redesigned Java Runtime Environment is still called "LiveConnect", despite the
The disadvantage of LiveConnect is, that it is heavily tied to the version of Java embedded within the Netscape browser. This prevented the browser from using other Java runtimes and added bloat to the browser download size since it required Java to script plugins. Additionally, LiveConnect is tricky to program: The developer has to define a Java class for the plugin, run it through a specialized Java
XPConnect
XPConnect (Cross Platform Connect) is a technology which enables simple interoperation between XPCOM and JavaScript.
Object connection
XPConnect allows JavaScript objects to transparently access and manipulate XPCOM objects. It also enables JavaScript objects to present XPCOM compliant interfaces to be called by XPCOM objects. A main goal is that objects communicating from either side of an XPCOM style interface should not generally need to know or care about the implementation language of the object on the other side of the interface.
XPConnect's primary reason for existence is to replace handwritten code used in places where native code needs to interact with JavaScript code. An example is the DOM module.
Security
Full privileges are only granted by default to chrome scripts, i.e. scripts that are part of the application or of an extension. For remote
Mozilla was already using XPCOM to define the
XPConnect uses the type library information to marshal calls between different thread contexts and between JavaScript and natively compiled C++. XPConnect is used extensively throughout Mozilla. Starting with Netscape 6.1 and Mozilla 0.9.2, NPAPI was extended, so that a plugin could return a scriptable interface to itself and XPConnect would marshal calls to it from JavaScript and the C++ implementation.
XPConnect has no Java dependency. However, the technology is based on XPCOM. Thus the plugin developer must be familiar with reference counting, interfaces and IDL to implement scripting. The dependency on XPCOM led to certain dynamic linking issues (e.g. the fragile base class problem) which had to be solved before the plugin would work correctly with different browsers. XPCOM has since been changed to supply a statically linked version to address such issues. This approach also requires an .xpt file to be installed next to the dynamic-link library (DLL); otherwise the plugin appears to work, but the scripting does not, causing confusion.
NPRuntime
At the end of 2004, all major browser companies using NPAPI agreed on NPRuntime[8] as an extension to the original NPAPI to supply scripting, via an API that is similar in style to the old C-style NPAPI and is independent of other browser technologies like Java or XPCOM. It is only supported by Firefox ESR (Extended Support Release) and Safari.
Support
Because of the age of the API, security issues, and adoption of alternative technologies such as HTML5, many software vendors began to phase out NPAPI support in 2013.[9][10]
Internet Explorer
Internet Explorer versions 3 through 5.5 SP2 supported NPAPI, allowing plugins that functioned in Netscape Navigator to function in Internet Explorer. Support came via a small ActiveX control (named "plugin.ocx
") that acted as a shim between ActiveX and the NPAPI plugin. Microsoft dropped support in version 5.5 SP2 onwards for security reasons.[11][12][13][14]
Google Chrome
Opera
Opera dropped support with version 37 in May 2016.[citation needed]
Firefox
Mozilla Firefox release 52.0 in March 2017 removed all support for NPAPI except for Flash.[19][20][21] Meanwhile, the ESR channel retained general support for this feature with version 52 ESR being the last NPAPI resort. Firefox 69.0 disabled the Flash NPAPI by default.[22][23] In Firefox 85.0, released in January 2021, NPAPI support was completely removed.[24][25] In the ESR channel, support for Flash NPAPI ended with version 78.15.0, released in October 2021.[26][27]
Safari
Safari has dropped support for all NPAPI plugins except for Flash with version 12 released in September 2018.[28] Flash support has been removed from Safari 14, released in September 2020.[29]
SeaMonkey
SeaMonkey[30] stopped supporting NPAPI plugins from version 2.53.1, with the exception of Flash. NPAPI support was completely removed in SeaMonkey 2.53.7, released in March 2021.[31]
Support
The following list of
- 360 Secure Browser (Chinese: 360安全浏览器) or 360 Extreme Explorer (Chinese: 360极速浏览器)[32]
- Basilisk[33]
- K-Meleon[34] (Goanna engine)[35]
- Uzbl[38]
Similar technologies
ActiveX
Internet Explorer and browsers based on Internet Explorer use ActiveX controls, ActiveX documents and ActiveX scripting to offer in-page extensibility on par with NPAPI. Although commonly associated with Internet Explorer, ActiveX is integration technology that allows any computer program to integrate parts of other computer programs that support such integration.[39] Internet Explorer, however, is discontinued and its replacement, Microsoft Edge, does not support ActiveX.
PPAPI
On 12 August 2009 a page on Google Code[40] introduced a new project called Pepper, with the associated Pepper Plugin API (PPAPI);[41] PPAPI is a derivative of NPAPI aimed to make plugins more portable and more secure.[42] This extension is designed specifically to ease the implementation of out-of-process plugin execution.
PPAPI was initially only supported by Google Chrome and Chromium. Later, other Chromium-based browsers such as Opera and Vivaldi added PPAPI plugin support.
In February 2012
In August 2020, Google announced that support for PPAPI would be removed from Google Chrome and Chromium in June 2022.[45]
See also
References
- ^ Costlow, Erik (March 15, 2021). "The End of Applets". InfoQ. Retrieved 2021-10-02.
- ^ "Brendan Eich: JavaScript, Firefox, Mozilla, and Brave". Retrieved 2025-03-24.
as stated by Brendan Eich in the Lex Fridman Podcast
- ^ Flanagan, David. (2006). JavaScript: The Definitive Guide. O'Reilly, Sebastopol, California.
- ^ For technical details, see the Mozilla Developer Documentation on LiveConnect Archived 2008-05-14 at the Wayback Machine.
- ^ "442399 – remove LiveConnect from the tree". mozilla.org.
- ^ "517355 – Restore OJI, Liveconnect and the JEP on the 1.9.2 branch on OS X". mozilla.org.
- ^ "Release Notes for the Next-Generation Java™ Plug-In Technology (introduced in Java SE 6 update 10)". sun.com.
- ^ "Scripting plugins". Mozilla Developer Network. Archived from the original on 2008-11-18. Retrieved 2009-08-29.
- ^ "Change in support for Acrobat and Reader plug-ins in modern web browsers". Adobe. 8 February 2016.
- ^ "Oracle deprecates the Java browser plugin, prepares for its demise". Ars Technica. 28 January 2016. Retrieved 15 April 2016.
- ^ "Netscape-Style Plug-ins Do Not Work After Upgrading Internet Explorer". Support (3.3 ed.). Microsoft. 27 July 2007.
- ^ Giannandrea, J. (4 September 2001). "Microsoft breaks Web Plugins in Windows XP". meer.net. Archived from the original on 16 October 2007.
- ^ "Description of Internet Explorer Support for Netscape-Style Plug-ins". Support (3.4 ed.). Microsoft. 31 January 2007.
- ^ "Microsoft Security Bulletin MS03-015 – Critical". Security TechCenter. Microsoft. 23 April 2003.
- ^ "The final countdown for NPAPI". Chromium Blog.
- ^ Google will start blocking most Netscape Plug-In API plug-ins in January 2014, will whitelist Silverlight, Unity & others". TechCrunch. 23 September 2013.
- ^ "Google looks to drop Netscape Plugin API support in Chrome, starting with blocking most plugins in January 2014". The Next Web. 23 September 2013.
- ^ "Update on NPAPI deprecation". Chromium Blog. 27 May 2014.
- ^ "Firefox 52.0, See All New Features, Updates and Fixes". Mozilla.
- ^ "Firefox dropping NPAPI plugins by the end of 2016—except for Flash". Firefox Site Compatibility. 4 October 2016. Archived from the original on 15 March 2017. Retrieved 25 January 2017.
- ^ "Why do Java, Silverlight, Adobe Acrobat and other plugins no longer work?". Mozilla support. Archived from the original on 2017-03-07. Retrieved 2017-03-06.
- ^ "1519434 - Disable Flash support by default in Firefox 69". bugzilla.mozilla.org. Retrieved 2019-01-14.
- ^ "Plugin Roadmap for Firefox - Plugins". MDN Web Docs. Retrieved 2021-07-12.
- ^ Jim Mathies (13 November 2020). "Removal of NPAPI plugin support in Firefox 85". mozilla.dev.platform (via Google Groups). Retrieved 10 February 2021.
- ^ "Plugin Roadmap for Firefox". MDN. 19 January 2021. Archived from the original on 21 January 2021. Retrieved 10 February 2021.
- ^ "Firefox for Enterprise 91 - Release notes | Firefox for Enterprise Help". support.mozilla.org. Retrieved 2022-02-13.
- ^ "Firefox ESR 78.15.0, See All New Features, Updates and Fixes". Mozilla. Retrieved 2022-01-03.
- ^ Clover, Juli (September 17, 2018). "Apple Releases Safari 12 for macOS Sierra and macOS High Sierra". MacRumors.
- ^ "Safari 14 Release Notes". Apple Developer Documentation.
- ^ "Why do Oracle Java, Microsoft Silverlight, Adobe Acrobat Reader and other plugins no longer work?" NPAPI plugins
- ^ "SeaMonkey 2.53.7 Release Notes". Retrieved 14 March 2021.
- ^ "NPAPI 是重型武器,当别的方法无法到达你的目的时,才建议使用。". NPAPI 插件.
- ^ "Support for all NPAPI plugins (Unity, Silverlight, Flash, Java, authentication plugins, etc.)". Basilisk features.
- ^ "Most third-party plug-ins designed for Mozilla/Netscape will also work with K-Meleon".Third party plugins.
- ^ "Load all NPAPI-Plugins, Java, Silverlight, etc." K-Meleon Hybrid (Goanna over Pro).
- ^ "Full and ongoing support for NPAPI plugins (Java, Silverlight, etc.)". Pale Moon: Technical Details
- ^ "Pale Moon supports NPAPI plug-ins. Unlike Firefox, we will not be deprecating or removing support for these kinds of plug-ins". Pale Moon future roadmap.
- ^ "We use the NPAPI plugin architecture (just like Mozilla) so just install the plugins normally, and things should work". Uzbl FAQ.
- ^ "Description of ActiveX Technologies". Support. Microsoft. 19 January 2007.
- Google Code. Archived from the originalon 2010-07-02.
- ^ "Getting Started: Background and Basics – The Chromium Projects". chromium.org.
- ^ "Concepts - ppapi - Important concepts for working with PPAPI. - Pepper Plugin API – Google Project Hosting". google.com.
- ^ "Adobe and Google Partnering for Flash Player on Linux". adobe.com. Archived from the original on 2012-02-23. Retrieved 2012-03-07.
- ^ Campbell, Chris (31 August 2016). "Beta News – Flash Player NPAPI for Linux". Adobe AIR and Adobe Flash Player Team Blog. Adobe Systems. Retrieved 8 September 2016.
- ^ Anthony Laforge (August 10, 2020). "Changes to the Chrome App Support Timeline". Chromium Blog.
External links
- Plugin development documentation Archived 2012-08-03 at the Wayback Machine on Mozilla Developer Center, including the NPAPI API
- An ActiveX control that hosts plugins – a replacement for plugin.ocx that was removed from Internet Explorer.
- Book on Programming Netscape Plug-Ins by Zan Oliphant
- Nixysa: A glue code generation framework for NPAPI plugins. Apache 2.0 license.
- NPAPI Tutorial Building a Firefox Plugin (Part two, Part three, Part four)
- Opera 15+ extensions documentation