JavaScript Navigator appName Property

Beginner
⏱️ 8 min read
📚 Updated: Jul 2026
🎯 5 Examples
🚀 5 Try-it labs
Read-only property

What You’ll Learn

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.

01

Kind

Read-only property

02

Returns

"Netscape"

03

Purpose

Compatibility only

04

Sniffing?

Do not use

05

Baseline

Widely available

06

Prefer

Feature detection

Introduction

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.

💡
MDN warning

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.

Understanding the appName Property

appName is a read-only string on Navigator. Historically it meant “application name.” In practice it is a fixed compatibility value.

  • Value is always "Netscape" in conforming browsers.
  • Kept for old scripts that expected that string.
  • Useless for telling Chrome apart from Firefox or Safari.
  • Sibling of appCodeName in the legacy Navigator string family.

📝 Syntax

General form of the property:

JavaScript
navigator.appName

Value

  • The string "Netscape".

Common patterns

JavaScript
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
}

⚡ Quick Reference

GoalCode
Read the valuenavigator.appName
Expected string"Netscape"
Equality checknavigator.appName === "Netscape"
Legacy pairappCodeName + appName
Identify browser?No — do not sniff with this
Better approachFeature detection on APIs / CSS

🔍 At a Glance

Four facts to remember about appName.

Value
"Netscape"

Every browser

Kind
string

Read-only

Use for
legacy

Compatibility

Sniffing
avoid

Not a brand

📋 appName vs appCodeName

appNameappCodeName
Fixed value"Netscape""Mozilla"
PurposeLegacy compatibilityLegacy compatibility
Identifies brand?NoNo
Read-only?YesYes
Modern adviceIgnore for sniffingIgnore for sniffing

Examples Gallery

Examples follow MDN Navigator.appName behavior. Use View Output or Try It Yourself for each case.

📚 Getting Started

Read the property and confirm the fixed value.

Example 1 — Basic appName

Log the property in the current browser.

JavaScript
console.log(navigator.appName);
// Netscape
Try It Yourself

How It Works

Whatever browser you use for Try It, MDN’s rule holds: the value is "Netscape".

Example 2 — Always Equals "Netscape"

Show the boolean check beginners often expect to branch on.

JavaScript
const name = navigator.appName;
const isNetscapeLabel = name === "Netscape";

console.log(name);
console.log("isNetscapeLabel: " + isNetscapeLabel);
// Netscape
// isNetscapeLabel: true
Try It Yourself

How It Works

The check is true almost everywhere — which proves it cannot identify a specific browser brand.

📈 Practical Patterns

Pair with appCodeName, string basics, and feature detection.

Example 3 — Classic Legacy Pair

Read appCodeName and appName together.

JavaScript
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
Try It Yourself

How It Works

Old tutorials often printed both. Knowing the pair helps you recognize legacy sniffing instantly.

Example 4 — Type and Length

Treat it as a normal string for learning JavaScript basics.

JavaScript
const name = navigator.appName;
console.log(typeof name);
console.log(name.length);
console.log(name.toUpperCase());
// string
// 8
// NETSCAPE
Try It Yourself

How It Works

"Netscape" has 8 characters. Useful for teaching typeof and string methods.

Example 5 — Prefer Feature Detection

Check capabilities instead of application names.

JavaScript
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"));
Try It Yourself

How It Works

Feature detection answers “can I use this?” — the question your app actually cares about.

🚀 Common Use Cases

  • Learning Navigator — another fixed read-only string on navigator.
  • Reading legacy code — understand checks for "Netscape".
  • Teaching anti-patterns — show why sniffing with appName fails.
  • Pairing with appCodeName — recognize the classic Mozilla / Netscape duo.
  • Not for production branching — do not gate features on this value.

🧠 How appName Works

1

Page reads navigator

Your script accesses navigator.appName.

Read
2

Browser returns fixed string

Spec / compatibility: value is "Netscape".

Value
3

Old scripts keep working

Legacy checks that expected Netscape do not break.

Compat
4

Modern apps ignore it

Use feature detection for real capability checks.

📝 Notes

  • Always "Netscape" — not a real browser name.
  • Kept only for compatibility with old content.
  • Do not use for browser or engine detection.
  • Baseline Widely available across modern browsers.
  • Related: appVersion, appCodeName, activeVRDisplays, Window.

Universal Browser Support

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.

Baseline · Widely available

Navigator.appName

Safe to read anywhere — but treat it as a fixed legacy string, not a brand detector.

Universal Widely available
Google Chrome All versions · Desktop & Mobile
Full support
Mozilla Firefox All versions · Desktop & Mobile
Full support
Apple Safari All versions · macOS & iOS
Full support
Microsoft Edge All versions · Chromium & Legacy
Full support
Internet Explorer IE 6+ · Legacy environments
Full support
Opera All modern versions
Full support
appName Excellent

Bottom line: You can read appName in any modern browser. Never branch product logic on it — use feature detection instead.

Conclusion

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.

💡 Best Practices

✅ Do

  • Treat the value as a fixed compatibility string
  • Learn it alongside appCodeName
  • Use feature detection for APIs you need
  • Document legacy sniffing when maintaining old code
  • Prefer progressive enhancement over brand checks

❌ Don’t

  • Assume "Netscape" means a 1990s browser
  • Gate Chrome/Safari features on appName
  • Expect a unique product name per browser
  • Build new detection libraries on this property
  • Confuse compatibility support with usefulness

Key Takeaways

Knowledge Unlocked

Five things to remember about appName

A legacy Navigator string that always says Netscape.

5
Core concepts
🔒 02

Read-only

string property

API
🔁 03

Why

compatibility

Legacy
🚫 04

Sniffing

do not use

Avoid
05

Prefer

feature detect

Modern

❓ Frequently Asked Questions

In every modern browser it returns the string "Netscape". The property exists only for historical compatibility with very old scripts.
No. MDN warns not to rely on it for a real browser name. Chrome, Edge, Safari, Firefox, and others all report "Netscape".
Early sites sniffed for Netscape. Other browsers reported the same name so those pages would still work. The habit stuck as a compatibility value.
Both are fixed legacy strings. appCodeName is always "Mozilla"; appName is always "Netscape". Neither identifies today’s browser brand.
No. It is a read-only Navigator property. You read it; you do not assign a new value.
Prefer feature detection (for example "geolocation" in navigator or CSS/API checks) over reading appName, appCodeName, or brittle user-agent parses.
Did you know?

Together, 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.

Learn appVersion Next

A browser-dependent version-like Navigator string.

appVersion →

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.

8 people found this page helpful