navigator.javaEnabled()
browser tricks 1996 partlyAsk the browser if Java is on. The answer has been a hard-wired no for a decade.
In 2026: Partly, as a fossil: navigator.javaEnabled() still exists because the HTML standard requires it to, and it must return false, always. Pages once branched on it before writing an APPLET tag. It joins taintEnabled and captureEvents in the retirement home for feature tests, kept alive purely so thirty year old scripts do not throw.
Where it came from: Netscape JavaScript 1.1, 1996, guarding APPLET writes. The method outlived Java in the browser and is now specified to return false forever.
HTML standard ↗MDN ↗
<script language="JavaScript">
if (navigator.javaEnabled) {
document.write("<p><code>navigator.javaEnabled()</code> returns <b>" +
navigator.javaEnabled() + "</b>.</p>");
document.write("<p style='font:13px Verdana'>The HTML standard requires the method " +
"to exist and requires the answer to be false. In 1996 a true meant it was safe " +
"to document.write an APPLET tag.</p>");
} else {
document.write("<p>Even the stub is gone in this browser.</p>");
}
</script>