JavaScript Navigator javaEnabled() Method

Beginner
5 min read
Updated: Nov 2026
3 examples
Method

Definition

navigator.javaEnabled() historically asked whether the browser’s Java plugin (applets) was available. MDN: today it always returns false. Baseline Widely available — not Deprecated, Experimental, or Non-standard.

Pass the required arguments shown below. Check return values and browser support before you rely on the result.

Syntax

Call navigator.javaEnabled. Start with this line.

JavaScript
navigator.javaEnabled()
CallWhat it does
navigator.javaEnabled()Primary signature.
navigator.javaEnabled(...)Call with the arguments your case needs.

Built into the browser. Call javaEnabled(...) on a Navigator — no import required.

Library declarations
JavaScript
navigator.javaEnabled()

Parameters

This member has no parameters beyond those shown in the signature.

Return Value

Return ValueDescription
*Always false

JavaScript Examples

Example 1 — Call Returns false (MDN)

MDN’s contract is simple: the boolean is always false.

JavaScript
const result = navigator.javaEnabled();
console.log(result);        // false
console.log(typeof result); // "boolean"
Try It Yourself

How It Works

  1. No arguments. Call with an empty argument list (MDN).
  2. Boolean false. Every modern engine follows this contract.
  3. Widely present. Baseline since July 2015 (MDN).
  4. Literacy value. Know the return — do not trust it for features.

Example 2 — Why if (javaEnabled()) Is Dead

MDN’s own example: the condition is always false, so the body never runs.

JavaScript
if (window.navigator.javaEnabled()) {
  console.log("Java plugin available"); // never prints
} else {
  console.log("Java plugin unavailable");
}

// Prefer real feature detection for modern APIs.
Try It Yourself

How It Works

  1. Old scripts gated applet UI on this check.
  2. Today the call is false, so the if body never runs.
  3. MDN documents this as the expected modern behavior.
  4. Replace with detecting the real API you need.

Example 3 — vs taintEnabled()

Both are historical stubs that return false when present — different origins.

JavaScript
console.log("javaEnabled →", navigator.javaEnabled());

if (typeof navigator.taintEnabled === "function") {
  console.log("taintEnabled →", navigator.taintEnabled());
} else {
  console.log("taintEnabled → missing");
}

// javaEnabled → Java applets plugin (always false)
// taintEnabled → JS 1.2 tainting (false when present)
Try It Yourself

How It Works

  1. Call javaEnabled. Expect false everywhere Baseline covers.
  2. Feature-detect taintEnabled. Often missing outside Gecko.
  3. Same “false” vibe, different history — do not mix them up.
  4. Neither is a modern security or plugin API.

Browser Support

navigator.javaEnabled() is Baseline Widely available (MDN: since July 2015). It always returns false. Not Deprecated, Experimental, or Non-standard.

✓ Baseline Widely available

Navigator.javaEnabled()

Historical Java-plugin check — always false. Literacy only for feature gating.

Baseline Always false
Google Chrome Supported (always false)
Yes
Microsoft Edge Supported (always false)
Yes
Mozilla Firefox Supported (always false)
Yes
Apple Safari Supported (always false)
Yes
Opera Supported (always false)
Yes
Internet Explorer Legacy support
Legacy
javaEnabled() false everywhere

Bottom line: Recognize in old scripts; never ship new logic on it. See the MDN javaEnabled() reference.

Frequently Asked Questions

MDN: this method always returns false. It historically reported whether the browser’s Java plugin was available for applets.
No. MDN marks it Baseline Widely available (since July 2015). It is not Deprecated, Experimental, or Non-standard — so no status banner is required. Its result is simply always false.
Modern browsers no longer support the old Java browser plugin / applets model. The method remains for compatibility but cannot report a working Java plugin.
Not for real feature decisions. Calling it is harmless, but if (navigator.javaEnabled()) blocks never run. Prefer feature detection for the APIs you actually need.
No. Call navigator.javaEnabled() with no arguments. It returns a boolean (always false).
No. It was about the browser’s old Java plugin for applets — not about whether your backend uses Java, Node, or another language.

Next: registerProtocolHandler()

Continue with the next Navigator method in the tutorial series.

registerProtocolHandler() →

About the author

Mari Selvan M P
Mari Selvan M P 🔗

Developer, cloud engineer, and technical writer

  • Experience 12 years building web and cloud systems
  • Focus Full Stack Development, AWS, and Developer Education

I write practical tutorials so students and working developers can learn by doing—from databases and APIs to deployment on AWS.

24 people found this page helpful