JavaScript Navigator appVersion Property

Beginner
5 min read
Updated: Nov 2026
3 examples
Property

Definition

navigator.appVersion is a read-only string that claims to describe version information about the browser (MDN). The text varies a lot by engine — do not treat it as a stable API.

Read the notes below before you rely on this property. Prefer feature detection when support is limited.

Syntax

Use navigator.appVersion. Start with this line.

JavaScript
navigator.appVersion
CallWhat it does
navigator.appVersionPrimary signature.

Built into the browser. Read navigator.appVersion on Navigator — no import required.

Library declarations
JavaScript
navigator.appVersion

Parameters

This member has no parameters beyond those shown in the signature.

Return Value

Return ValueDescription
*The current value of navigator.appVersion.

JavaScript Examples

Example 1 — Read appVersion

Log the version-like string from navigator.

JavaScript
console.log(navigator.appVersion);
// Chrome-like: long string · Firefox: often short
Try It Yourself

How It Works

  1. Access navigator. The browser exposes environment info on navigator.
  2. Read the property. appVersion is a string getter.
  3. See your browser’s text. Length and shape are not standardized.
  4. No side effects. Reading it does not change the page.

Example 2 — Compare with userAgent

See how the two strings relate in this browser.

JavaScript
const av = navigator.appVersion;
const ua = navigator.userAgent;

console.log("appVersion:", av);
console.log("userAgent:", ua);
console.log("lengths:", av.length, ua.length);

// In some browsers, appVersion ≈ userAgent without "Mozilla/"
const stripped = ua.replace(/^Mozilla\//, "");
console.log("UA without Mozilla/ equals appVersion?", stripped === av);
Try It Yourself

How It Works

  1. Read both strings. Capture appVersion and userAgent.
  2. Compare lengths. Firefox often keeps appVersion much shorter.
  3. Optional strip test. Remove a leading Mozilla/ from UA and compare.
  4. Lesson. Related in some engines — never a portable contract.

Example 3 — Feature Detect Instead

Skip version sniffing — branch on a real capability.

JavaScript
console.log("appVersion (demo only):", navigator.appVersion);

// Prefer this style for real apps:
if ("serviceWorker" in navigator) {
  console.log("serviceWorker available");
} else {
  console.log("serviceWorker missing");
}
Try It Yourself

How It Works

  1. Show the string. Log appVersion for learning only.
  2. Do not parse it. Avoid includes("Chrome") for product logic.
  3. Feature detect. Use in on the API you need.
  4. Branch safely. Capabilities beat brittle version text.

Browser Support

navigator.appVersion is marked Baseline Widely available on MDN (since July 2015). Support is universal — the value shape is not.

✓ Baseline · Widely available

Navigator.appVersion

Read-only version-like string. Available everywhere; format differs by browser. Unreliable for detection — prefer feature detection.

100% 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
appVersion Excellent

Bottom line: Safe to read for demos. Never use it for browser or version detection in product code — detect the feature you need instead.

Frequently Asked Questions

A string with version-like browser information. The exact text varies a lot by browser — sometimes nearly a userAgent without the Mozilla/ prefix, sometimes a short platform hint.
No. Chrome-like browsers often return a long string; Firefox often returns a short string such as "5.0 (Macintosh)". Treat the format as browser-dependent.
It is unreliable and not recommended. MDN points to User-Agent reduction and browser-detection pitfalls. Prefer feature detection instead.
In some browsers appVersion looks like userAgent with Mozilla/ removed. In others it is much shorter. Do not assume they stay in sync forever.
No. It is a read-only Navigator property. You read it; you do not assign a new value.
Feature detection (for example "serviceWorker" in navigator) or well-supported APIs — not parsing appVersion for product logic.

Next: audioSession

Learn the related Navigator audioSession property.

audioSession tutorial →

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.

7 people found this page helpful