Ask for the API.in checks whether geolocation exists.
Branch on capability. Enable or disable that feature only.
Rule. Detect what you need; do not guess the browser brand.
Compatibility
Browser Support
navigator.appCodeName is marked Baseline Widely available on MDN (since July 2015). Support is universal — the value is always "Mozilla".
✓ Baseline · Widely available
Navigator.appCodeName
Read-only string that always returns "Mozilla". 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
appCodeNameExcellent
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 "Mozilla". The property exists only for historical compatibility with very old scripts.
No. MDN warns not to rely on it for a real product name. Chrome, Edge, Safari, Firefox, and others all report "Mozilla".
Early browsers pretended to be Mozilla so sites that sniffed user-agent strings would still work. appCodeName kept that compatibility habit.
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 appCodeName, appName, or brittle user-agent parses.
MDN does not mark it Deprecated — it is Baseline Widely available and kept for compatibility. Still, do not use it to identify browsers.