Lesson. You cannot tell browsers apart with this check.
Example 3 — Pair with appCodeName
Both legacy strings are fixed — useful only as a history lesson.
JavaScript
console.log(navigator.appName); // "Netscape"
console.log(navigator.appCodeName); // "Mozilla"
// Avoid sniffing with either value — prefer feature detection instead.
if ("geolocation" in navigator) {
console.log("geolocation available");
}
Read both names.appName and appCodeName are the classic pair.
See the fixed values.Netscape + Mozilla everywhere.
Skip sniffing. Neither string identifies Chrome vs Firefox.
Feature detect. Branch on a real API like geolocation instead.
Compatibility
Browser Support
navigator.appName is marked Baseline Widely available on MDN (since July 2015). Support is universal — the value is always "Netscape".
✓ Baseline · Widely available
Navigator.appName
Read-only string that always returns "Netscape". Available everywhere for compatibility; not useful for identifying browsers.
100%Widely available
Google ChromeAll versions · Desktop & Mobile
Full support
Mozilla FirefoxAll versions · Desktop & Mobile
Full support
Apple SafariAll versions · macOS & iOS
Full support
Microsoft EdgeAll versions · Chromium & Legacy
Full support
Internet ExplorerIE 6+ · Legacy environments
Full support
OperaAll modern versions
Full support
appNameExcellent
Bottom line: Safe to read for demos and legacy understanding. Never use it for browser detection — prefer feature detection for real product decisions.
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.
MDN does not mark it Deprecated — it is Baseline Widely available and kept for compatibility. Still, do not use it to identify browsers.