Please note, this is a STATIC archive of website developer.mozilla.org from November 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

Returns a PluginArray object, listing the plugins installed in the application.

In Firefox 29 and later, enumeration of the navigator.plugins array may be restricted as a privacy measure. Applications that must check for the presence of a browser plugin should query navigator.plugins or navigator.mimeTypes by exact name instead of enumerating the navigator.plugins array and comparing every plugin's name. This privacy change does not disable any plugins; it just hides some plugin names from enumeration.

Syntax

var plugins = navigator.plugins;

plugins is used to access Plugin objects either by name or as an array of items.

The returned value is not a JavaScript array, but has the length property and supports accessing individual items using bracket notation (plugins[2]), as well as via item(index) and namedItem("name") methods.

Examples

The following example function return for the Flash version.

function getFlashVersion() {
  var flash = navigator.plugins['Shockwave Flash'];
  if (flash === undefined) {
    // flash is not present
    return undefined;
  }
  return flash.version;
}

The following example prints out information about the installed plugin(s) for the high-level document.

var L = navigator.plugins.length;

document.write(
  L.toString() + " Plugin(s)<br>" +
  "Name | Filename | description<br>"
);

for(var i = 0; i < L; i++) {
  document.write(
    navigator.plugins[i].name +
    " | " +
    navigator.plugins[i].filename +
    " | " +
    navigator.plugins[i].description +
    " | " +
    navigator.plugins[i].version +
    "<br>"
  );
}

Notes

The Plugin object exposes a small interface for getting information about the various plugins installed in your browser. A list of plugins is also available by entering about:plugins in the browser's Location bar.

Specification

This isn't defined in any specification.

Document Tags and Contributors

 Last updated by: teoli,