Misplaced Pages

NPAPI

Article snapshot taken from Wikipedia with creative commons attribution-sharealike license. Give it a read and then ask your questions in the chat. We can research this topic together.

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.

#458541

55-809: In the NPAPI architecture, a plugin declares content types (e.g. "audio/mp3") that it can handle. When the browser encounters a content type it cannot handle natively, it loads the appropriate plugin, sets aside space within the browser context for the plugin to render and then streams data to it. The plugin is responsible for rendering the data. 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. NPAPI requires each plugin to implement and expose approximately 15 functions for initializing, creating, deleting and positioning plugin content. NPAPI also supports scripting, printing, full-screen plugins, windowless plugins and content streaming. NPAPI

110-444: A dummy implementation may be used to allow development to progress before the final implementation is available. In another case, a fake or mock implementation may be substituted during testing. Such stub implementations are replaced by real code later in the development process. Usually, a method defined in an interface contains no code and thus cannot itself be called; it must be implemented by non-abstract code to be run when it

165-426: A suffix and parameters : As an example, an HTML file might be designated text/html; charset=UTF-8 . In this example, text is the type, html is the subtype, and charset=UTF-8 is an optional parameter indicating the character encoding. Types, subtypes, and parameter names are case-insensitive. Parameter values are usually case-sensitive, but may be interpreted in a case-insensitive fashion depending on

220-412: A file, these two work together as follows: mime.types associates an extension with a MIME type, while mailcap associates a MIME type with a program. In UNIX-type systems, the mime.types file is usually located at /etc/ mime.types and/or $ HOME/ .mime.types and the format is simply that each line is a space-delimited list of a MIME type, followed by zero or more extensions. For example,

275-435: A given system. Hardware interfaces exist in many components, such as the various buses , storage devices , other I/O devices, etc. A hardware interface is described by the mechanical, electrical, and logical signals at the interface and the protocol for sequencing them (sometimes called signaling). A standard interface, such as SCSI , decouples the design and introduction of computing hardware, such as I/O devices, from

330-656: A leading cause of hangs, crashes, security incidents, and code complexity". In May 2014, NPAPI support was removed from the Linux version of Chrome 35 and later. In April 2015, Chrome for Windows and OS X (versions 42 and later) disabled NPAPI support by default. However, until September 2015 (version 45), users could re-enable NPAPI. Opera dropped support with version 37 in May 2016. Mozilla Firefox release 52.0 in March 2017 removed all support for NPAPI except for Flash. Meanwhile,

385-474: A media format, but it may or must also contain other content, such as a tree prefix, producer, product or suffix, according to the different rules in registration trees. All media types should be registered using the IANA registration procedures. For the efficiency and flexibility of the media type registration process, different structures of subtypes can be registered in registration trees that are distinguished by

440-547: A part of the MIME (Multipurpose Internet Mail Extensions) specification, for denoting type of email message content and attachments; hence the original name, MIME type . Media types are also used by other internet protocols such as HTTP , document file formats such as HTML , and the XDG specifications implemented by Linux desktop environments , for similar purposes. Different internet standards or web standards bodies differ on

495-401: A programming style called programming to the interface . The idea behind this approach is to base programming logic on the interfaces of the objects used, rather than on internal implementation details. Programming to the interface reduces dependency on implementation specifics and makes code more reusable. Pushing this idea to the extreme, inversion of control leaves the context to inject

550-424: A registration done by a third party. The personal or vanity tree includes media types associated with non publicly available products or experimental media types. It uses the prs. tree prefix. Examples are audio/prs.sid , image/prs.btif . The unregistered tree includes media types intended exclusively for use in private environments and only with the active agreement of the parties exchanging them. It uses

605-505: 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. Google Chrome permanently dropped all NPAPI support from all platforms in September 2015. In September 2013, Google announced that it would phase out NPAPI support in its Google Chrome browser during 2014, stating that "[its] 90s-era architecture has become

SECTION 10

#1732791659459

660-434: A software module A is deliberately defined separately from the implementation of that module. The latter contains the actual code of the procedures and methods described in the interface, as well as other "private" variables, procedures, etc. Another software module B , for example the client to A , that interacts with A is forced to do so only through the published interface. One practical advantage of this arrangement

715-459: 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 is a feature of Web browsers that allows Java and JavaScript software to intercommunicate within a Web page. From the Java side it allows an applet to invoke

770-431: Is a shared boundary across which two or more separate components of a computer system exchange information. The exchange can be between software , computer hardware , peripheral devices , humans , and combinations of these. Some computer hardware devices, such as a touchscreen , can both send and receive data through the interface, while others such as a mouse or microphone may only provide an interface to send data to

825-401: Is defined by RFC 1524 "A User Agent Configuration Mechanism for Multimedia Mail Format Information" but is not defined as an Internet standard. It is supported by most Unix systems. Lines can be comments starting with the # character, or a mime-type followed by how to handle that mime type. An associated file is the mime.types file, which associates filename extensions with a MIME type . If

880-588: 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 Adobe Systems announced that future Linux versions of Adobe Flash Player would be provided only via PPAPI. The previous release, Flash Player 11.2, with NPAPI support, would receive security updates for five years. In August 2016 Adobe announced that, contrary to their previous statement, it would again support

935-540: 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 header compiler , and implement native methods . Handling strings , exceptions , and other Java objects from C++

990-519: Is integration technology that allows any computer program to integrate parts of other computer programs that support such integration. Internet Explorer, however, is discontinued and its replacement, Microsoft Edge, does not support ActiveX. On 12 August 2009 a page on Google Code introduced a new project called Pepper, with the associated Pepper Plugin API (PPAPI); PPAPI is a derivative of NPAPI aimed to make plugins more portable and more secure. This extension

1045-460: Is invoked. An interface called " Stack " might define two methods: push() and pop() . It can be implemented in different ways, for example, FastStack and GenericStack —the first being fast, working with a data structure of fixed size, and the second using a data structure that can be resized, but at the cost of somewhat lower speed. Though interfaces can contain many methods, they may contain only one or even none at all. For example,

1100-561: Is non-obvious. In addition, LiveConnect uses an earlier and now obsolete application programming interface (API) for invoking native C++ calls from Java, called JRI. The JRI technology has long since been supplanted by JNI . XPConnect (Cross Platform Connect) is a technology which enables simple interoperation between XPCOM and JavaScript. 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

1155-493: Is still called "LiveConnect", despite the Open Java Interface -specific approach having been abandoned. With Netscape 4, NPAPI was extended to allow plugins to be scripted. This extension is called LiveConnect. A plugin could implement a Java class and expose an instance of it . The class could be called from JavaScript and from Java applets running within the page. The disadvantage of LiveConnect is, that it

SECTION 20

#1732791659459

1210-522: 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. Full privileges are only granted by default to chrome scripts, i.e. scripts that are part of

1265-411: Is that replacing the implementation of A with another implementation of the same interface should not cause B to fail—how A internally meets the requirements of the interface is not relevant to B , which is only concerned with the specifications of the interface. (See also Liskov substitution principle .) In some object-oriented languages, especially those without full multiple inheritance ,

1320-559: 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.

1375-659: The x. tree prefix. Examples are application/x.foo , video/x.bar . Media types in this tree cannot be registered. This type was originally defined in RFC 1590 (published in September 1993) using the x- or X- prefix. RFC 2048 (published in November 1996) introduced the x. prefix, but discouraged use of the unregistered tree, as new personal and vendor trees with relaxed registration requirements are now available. The current RFC 6838 (published in January 2013) maintains

1430-474: The CSS @media feature. The HTTP response header for providing the media type is Content-Type . The W3C has used ContentType as an XML data-type name for a media type. XDG specifications implemented by Linux desktop environments continue to use the term "MIME type". A media type consists of a type and a subtype , which is further structured into a tree . A media type can optionally define

1485-506: The Java language defines the interface Readable that has the single read () method; various implementations are used for different purposes, including BufferedReader , FileReader , InputStreamReader , PipedReader , and StringReader . Marker interfaces like Serializable contain no methods at all and serve to provide run-time information to generic processing using Reflection . The use of interfaces allows for

1540-400: 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. At

1595-762: 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. In Firefox 85.0, released in January 2021, NPAPI support was completely removed. In the ESR channel, support for Flash NPAPI ended with version 78.15.0, released in October 2021. Safari has dropped support for all NPAPI plugins except for Flash with version 12 released in September 2018. Flash support has been removed from Safari 14, released in September 2020. SeaMonkey stopped supporting NPAPI plugins from version 2.53.1, with

1650-481: The HTML type can be associated with the extensions .htm and .html by the following line: The mime.types file dates to Netscape , where it used a different format; it used key–value pairs and a comma-separated list of extensions, together with a standard header consisting of a specific comment that identifies the file as a mime.types file, as follows: Interface (computing) In computing, an interface

1705-454: The IESG, be registered in the standards tree with its unprefixed subtype. application/x-www-form-urlencoded is an example of a widely deployed type that ended up registered with the x- prefix. Suffix is an augmentation to the media type definition to additionally specify the underlying structure of that media type, allowing for generic processing based on that structure and independent of

NPAPI - Misplaced Pages Continue

1760-485: The MIME type is properly set, this is unnecessary, but MIME types may be incorrectly set, or set to a generic type such as application/octet-stream , and mime.types allows one to fall back on the extension in these cases. Similarly, since many file systems do not store MIME type information, but instead rely on the filename extension, a mime.types file is frequently used by web servers to determine MIME type. When viewing

1815-511: The Mozilla source code tree in late June 2009 as part of the Mozilla 2 cleanup effort. It is no longer needed with the release of a redesigned Java Runtime Environment from Sun Microsystems. However the old implementation was restored for Gecko 1.9.2, as Apple had yet to port the newer JRE over to Mac OS X. The Java–JavaScript functionality supported by the redesigned Java Runtime Environment

1870-608: The NPAPI Flash Player on Linux and keep releasing new versions of it. In August 2020, Google announced that support for PPAPI would be removed from Google Chrome and Chromium in June 2022. MIME type In information and communications technology , a media type , content type or MIME type is a two-part identifier for file formats and content formats . Their purpose is comparable to filename extensions and uniform type identifiers , in that they identify

1925-523: The application or of an extension. 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 ). Mozilla was already using XPCOM to define the interfaces to many objects implemented in C++. Each interface

1980-455: The context of Linux desktop environments , the unofficial top-level types inode ( inodes other than normal files, such as filesystem directories , device files or symbolic links ), x-content ( removable media , such as x-content/image-dcf for DCF digital cameras ), package ( package manager packages) and x-office (generic categories of office productivity software document) are used. A subtype typically consists of

2035-463: The context. Industry consortia as well as non-commercial entities can register media types in the vendor tree. A registration in the vendor tree may be created by anyone who needs to interchange files associated with some software product or set of products. However, the registration belongs to the vendor or organization producing the software that employs the type being registered, and that vendor or organization can at any time elect to assert ownership of

2090-561: The design and introduction of other components of a computing system, thereby allowing users and manufacturers great flexibility in the implementation of computing systems. Hardware interfaces can be parallel with several electrical connections carrying parts of the data simultaneously or serial where data are sent one bit at a time. A software interface may refer to a wide range of different types of interfaces at different "levels". For example, an operating system may interface with pieces of hardware. Applications or programs running on

2145-526: 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 to access Java runtime libraries, much as applets can. LiveConnect was used in Netscape 4 to implement scriptability of NPAPI plugins. The Open Java Interface -dependent implementation of LiveConnect was removed from

2200-823: The end of 2004, all major browser companies using NPAPI agreed on NPRuntime 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 . 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. 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

2255-424: The exact type's particular semantics. Media types that make use of a named structured syntax should use the appropriate IANA registered "+"suffix for that structured syntax when they are registered. Unregistered suffixes should not be used (since January 2013). Structured syntax suffix registration procedures are defined in RFC 6838. The +xml suffix has been defined since January 2001 (RFC 3023 ), and

NPAPI - Misplaced Pages Continue

2310-464: The exception of Flash. NPAPI support was completely removed in SeaMonkey 2.53.7, released in March 2021. The following list of web browsers support all NPAPI plugins: 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

2365-548: The intended data format. They are mainly used by technologies underpinning the Internet , and also used on Linux desktop systems. The Internet Assigned Numbers Authority (IANA) is the official authority for the standardization and publication of these classifications. Media types were originally defined in Request for Comments RFC   2045 (MIME) Part One: Format of Internet Message Bodies (Nov 1996) in November 1996 as

2420-436: The intended use. The "type" part defines the broad use of the media type. As of November 1996, the registered types were: application , audio , image , message , multipart , text and video . By July 2024, the registered types included the foregoing, plus font , example , model , and haptics . An unofficial top-level type in common use is chemical , used for chemical file formats . In

2475-435: The operating system may need to interact via data streams , filters, and pipelines. In object oriented programs , objects within an application may need to interact via methods . A key principle of design is to prohibit access to all resources by default, allowing access only through well-defined entry points, i.e., interfaces. Software interfaces provide access to computer resources (such as memory, CPU, storage, etc.) of

2530-466: The preferred term for this type of identifier. The IANA and IETF use the term "media type", and consider the term "MIME type" to be obsolete, since media types have become used in contexts unrelated to email, such as HTTP. By contrast, the WHATWG continues to use the term "MIME type" and discourages use of the term "media type" as ambiguous, since it is used with a different meaning in connection with

2585-410: The same recommendation, but subtypes prefixed with x- or X- are no longer considered to be members of this tree. Media types that have been widely deployed (with a subtype prefixed with x- or X- ) without being registered, should be, if possible, re-registered with a proper prefixed subtype. If this is not possible, the media type can, after an approval by both the media types reviewer and

2640-401: The same time. An interface is thus a type definition; anywhere an object can be exchanged (for example, in a function or method call) the type of the object to be exchanged can be defined in terms of one of its implemented interface s or base-classes rather than specifying the specific class . This approach means that any class that implements that interface can be used. For example,

2695-440: The standards tree must be either associated with IETF specifications approved directly by the IESG, or registered by an IANA recognized standards-related organization. The vendor tree includes media types associated with publicly available products. It uses the vnd. tree prefix. Examples are: application/vnd.ms-excel , application/vnd.oasis.opendocument.text . The terms "vendor" and "producer" are considered equivalent in

2750-440: The term interface is used to define an abstract type that acts as an abstraction of a class . It contains no data, but defines behaviours as method signatures. A class having code and data for all the methods corresponding to that interface and declaring so is said to implement that interface. Furthermore, even in single-inheritance-languages, one can implement multiple interfaces, and hence can be of different types at

2805-457: The underlying computer system; direct access (i.e., not through well-designed interfaces) to such resources by software can have major ramifications—sometimes disastrous ones—for functionality and stability. Interfaces between software components can provide constants , data types , types of procedures , exception specifications, and method signatures . Sometimes, public variables are also defined as part of an interface. The interface of

SECTION 50

#1732791659459

2860-581: The use of tree prefixes. Currently the following trees are created: standard (no prefix), vendor ( vnd. prefix), personal or vanity ( prs. prefix), unregistered ( x. prefix). These registration trees were first defined in November 1996 (obsoleted RFC 2048 - currently RFC 6838). New registration trees may be created by IETF Standards Action for external registration and management by well-known permanent organizations (e.g. scientific societies). The standards tree does not use any tree prefix. Examples are text/javascript , image/png . Registrations in

2915-438: Was defined by an IDL file, and run through an IDL compiler that produced header files and a language-neutral type library that was a binary representation of the interface. This binary described the interface, the methods, the parameters, the data structures and enumerations . XPConnect uses the type library information to marshal calls between different thread contexts and between JavaScript and natively compiled C++. XPConnect

2970-619: Was formally included in the initial contents of the Structured Syntax Suffix Registry along with +json , +ber , +der , +fastinfoset , +wbxml , and +zip in January 2013 (RFC 6839). Subsequent additions include +gzip , +cbor , +json-seq , and +cbor-seq . From the IANA registry: Mailcap (derived from the phrase "mail capability") is a type of meta file used to configure how MIME-aware applications such as mail clients and web browsers render files of different MIME-types. The mailcap format

3025-599: Was frequently used for plugins which required intensive, low-level performance such as video players, including Adobe Flash Player and Microsoft Silverlight , as well as platforms for web applications such as the Java Runtime Environment . 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 while superior technology exists. Scripting

#458541