Netscape Plugin Application Programming Interface (NPAPI) is a deprecated application programming interface (API) for web browser plugins, initially developed for Netscape Navigator 2.0 in 1995 and subsequently adopted by other browsers.
The plugin runs in-place within the page, as opposed to older browsers that had to launch an external application to handle unknown content types.
All major web browsers have removed support for 3rd party NPAPI plugins for security and maintenance reasons while superior technology exists.
Various versions of Netscape and then Mozilla supported this feature using different technologies, including LiveConnect, XPConnect, and NPRuntime.
XPConnect (Cross Platform Connect) is a technology which enables simple interoperation between XPCOM and JavaScript.
For remote HTML/XHTML/XUL documents, most XPCOM objects are not accessible by the scripts as they have limited privileges due to security reasons.
Even if they are accessible (e.g. the XMLHttpRequest object), the usual security restrictions can also be found (e.g. cannot open URLs of other domains).
XPConnect uses the type library information to marshal calls between different thread contexts and between JavaScript and natively compiled C++.
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.
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.
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.
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.
[citation needed] Mozilla Firefox release 52.0 in March 2017 removed all support for NPAPI except for Flash.
[25][26] Safari has dropped support for all NPAPI plugins except for Flash with version 12 released in September 2018.
The previous release, Flash Player 11.2, with NPAPI support, would receive security updates for five years.
[42] In August 2016 Adobe announced that, contrary to their previous statement, it would again support the NPAPI Flash Player on Linux and keep releasing new versions of it.