Example 1 — Basic appName
Log the property in the current browser.
console.log(navigator.appName);
// Netscape How It Works
Whatever browser you use for Try It, MDN’s rule holds: the value is "Netscape".

navigator.appName is a legacy Navigator property. Per MDN, its value is always "Netscape" in any browser — kept only for compatibility. Learn what it returns, how it pairs with appCodeName, five examples, and better alternatives.
Read-only property
"Netscape"
Compatibility only
Do not use
Widely available
Feature detection
In the 1990s, many sites checked the “application name” to decide which scripts to run. Netscape was a common target, so other browsers began reporting the same name. Today that value is frozen as a compatibility string.
Log navigator.appName in Chrome, Edge, Firefox, or Safari and you will see Netscape — not the brand name on the window chrome.
Do not rely on this property to return a real browser name. All browsers return "Netscape".
Pair it mentally with appCodeName ("Mozilla"): two legacy labels, zero modern brand detection.
appName PropertyappName is a read-only string on Navigator. Historically it meant “application name.” In practice it is a fixed compatibility value.
"Netscape" in conforming browsers.General form of the property:
navigator.appName "Netscape".console.log(navigator.appName); // "Netscape"
// Classic legacy pair:
console.log(navigator.appCodeName); // "Mozilla"
console.log(navigator.appName); // "Netscape"
// Prefer feature detection instead of sniffing:
if ("geolocation" in navigator) {
// safe to use navigator.geolocation
} | Goal | Code |
|---|---|
| Read the value | navigator.appName |
| Expected string | "Netscape" |
| Equality check | navigator.appName === "Netscape" |
| Legacy pair | appCodeName + appName |
| Identify browser? | No — do not sniff with this |
| Better approach | Feature detection on APIs / CSS |
Four facts to remember about appName.
"Netscape"Every browser
stringRead-only
legacyCompatibility
avoidNot a brand
appName vs appCodeNameappName | appCodeName | |
|---|---|---|
| Fixed value | "Netscape" | "Mozilla" |
| Purpose | Legacy compatibility | Legacy compatibility |
| Identifies brand? | No | No |
| Read-only? | Yes | Yes |
| Modern advice | Ignore for sniffing | Ignore for sniffing |
Examples follow MDN Navigator.appName behavior. Use View Output or Try It Yourself for each case.
Read the property and confirm the fixed value.
appNameLog the property in the current browser.
console.log(navigator.appName);
// Netscape Whatever browser you use for Try It, MDN’s rule holds: the value is "Netscape".
"Netscape"Show the boolean check beginners often expect to branch on.
const name = navigator.appName;
const isNetscapeLabel = name === "Netscape";
console.log(name);
console.log("isNetscapeLabel: " + isNetscapeLabel);
// Netscape
// isNetscapeLabel: true The check is true almost everywhere — which proves it cannot identify a specific browser brand.
Pair with appCodeName, string basics, and feature detection.
Read appCodeName and appName together.
const lines = [
"appCodeName: " + navigator.appCodeName,
"appName: " + navigator.appName,
"useful for brand detection? no"
];
console.log(lines.join("\n"));
// appCodeName: Mozilla
// appName: Netscape
// useful for brand detection? no Old tutorials often printed both. Knowing the pair helps you recognize legacy sniffing instantly.
Treat it as a normal string for learning JavaScript basics.
const name = navigator.appName;
console.log(typeof name);
console.log(name.length);
console.log(name.toUpperCase());
// string
// 8
// NETSCAPE "Netscape" has 8 characters. Useful for teaching typeof and string methods.
Check capabilities instead of application names.
const lines = [];
lines.push("appName: " + navigator.appName + " (ignore for sniffing)");
lines.push(
"geolocation API: " +
("geolocation" in navigator ? "available" : "missing")
);
lines.push(
"serviceWorker: " +
("serviceWorker" in navigator ? "available" : "missing")
);
console.log(lines.join("\n")); Feature detection answers “can I use this?” — the question your app actually cares about.
navigator."Netscape".appName fails.appName WorksYour script accesses navigator.appName.
Spec / compatibility: value is "Netscape".
Legacy checks that expected Netscape do not break.
Use feature detection for real capability checks.
"Netscape" — not a real browser name.navigator.appName is Baseline Widely available. Every major browser exposes it and returns "Netscape" for compatibility. Support does not mean it is useful for identifying browsers.
Safe to read anywhere — but treat it as a fixed legacy string, not a brand detector.
Bottom line: You can read appName in any modern browser. Never branch product logic on it — use feature detection instead.
navigator.appName is a tiny piece of web history: a read-only string that always says "Netscape". Know it for interviews and legacy code — then move on to feature detection for real applications.
Continue with appVersion, appCodeName, or Window methods.
appCodeName"Netscape" means a 1990s browserappNameappNameA legacy Navigator string that always says Netscape.
"Netscape"
Alwaysstring property
APIcompatibility
Legacydo not use
Avoidfeature detect
ModernTogether, appCodeName === "Mozilla" and appName === "Netscape" are a classic interview trivia pair. Getting both “right” still tells you nothing about which modern browser the user opened.
A browser-dependent version-like Navigator string.
8 people found this page helpful