JavaScript Navigator product Property

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

What You’ll Learn

navigator.product is a legacy Navigator property. Per MDN, its value is always "Gecko" in any browser — kept only for compatibility. Learn what it returns, why sniffing fails, five examples, and better alternatives.

01

Kind

Read-only property

02

Returns

"Gecko"

03

Purpose

Compatibility only

04

Sniffing?

Do not use

05

Baseline

Widely available

06

Prefer

Feature detection

Introduction

The name product sounds like it should tell you which browser engine you are on. In practice, the HTML specification requires every conforming browser to return the fixed string "Gecko".

So if you log navigator.product in Chrome, Edge, Firefox, or Safari, you will almost always see the same value: Gecko.

💡
MDN warning

Do not rely on this property to return a real product name. All browsers return "Gecko".

Learn it so legacy code makes sense — then use feature detection for real apps.

Understanding the product Property

product is a read-only string on Navigator. Historically it related to engine / product labeling. Today it is a fixed compatibility value.

  • Value is always "Gecko" in conforming browsers.
  • Kept for old scripts that expected that string.
  • Useless for telling Chrome apart from Firefox or Safari.
  • Part of the same legacy family as appCodeName and appName.

📝 Syntax

General form of the property:

JavaScript
navigator.product

Value

  • The string "Gecko".

Common patterns

JavaScript
console.log(navigator.product); // "Gecko"

// Always true in modern browsers:
const isLegacyGeckoLabel = navigator.product === "Gecko";

// Prefer feature detection instead of sniffing:
if ("serviceWorker" in navigator) {
  // safe to use service workers
}

⚡ Quick Reference

GoalCode
Read the valuenavigator.product
Expected string"Gecko"
Equality checknavigator.product === "Gecko"
Typetypeof navigator.product // "string"
Identify browser?No — do not sniff with this
Better approachFeature detection on APIs / CSS

🔍 At a Glance

Four facts to remember about navigator.product.

Value
"Gecko"

Every browser

Kind
string

Read-only

Use for
legacy

Compatibility

Sniffing
avoid

Not a brand

📋 Legacy Navigator Labels vs Feature Detection

productappCodeNameFeature detection
Typical value"Gecko""Mozilla"N/A
Identifies brand?NoNoChecks capability
ReliabilityFixed compatibility stringFixed compatibility stringHigh for APIs
Best forUnderstanding legacy codeUnderstanding legacy codeReal application logic

Examples Gallery

Examples follow MDN navigator.product behavior. Prefer Try It Yourself — you should see Gecko in any modern browser.

📚 Getting Started

Read the fixed string and confirm it is always Gecko.

Example 1 — Read product

Log the current value.

JavaScript
console.log(navigator.product);
Try It Yourself

How It Works

MDN: the value is always "Gecko" in any browser.

Example 2 — Always Equals "Gecko"

Show the equality check beginners expect from sniffing (and why it fails).

JavaScript
const isGeckoLabel = navigator.product === "Gecko";
console.log("product === \"Gecko\": " + isGeckoLabel);
console.log("This does NOT mean you are on Firefox.");
Try It Yourself

How It Works

The check is almost always true everywhere — so it cannot identify a browser brand.

📈 Practical Patterns

Type checks, related legacy labels, and feature detection.

Example 3 — Confirm String Type

Beginner sanity check for the property type.

JavaScript
const lines = [
  "value: " + navigator.product,
  "typeof: " + typeof navigator.product
];
console.log(lines.join("\n"));
Try It Yourself

How It Works

You get a real string — just not a useful brand identifier.

Example 4 — Legacy Label Family

Compare product with other fixed Navigator compatibility strings.

JavaScript
const lines = [
  "product: " + navigator.product,
  "appCodeName: " + navigator.appCodeName,
  "appName: " + navigator.appName
];
console.log(lines.join("\n"));
console.log("None of these identify a modern browser brand.");
Try It Yourself

How It Works

Seeing this trio together makes the compatibility story obvious for beginners.

Example 5 — Prefer Feature Detection

Keep product for learning; use capability checks for features.

JavaScript
const lines = [];
lines.push(
  "product: " + navigator.product + " — ignore for sniffing"
);
lines.push(
  "serviceWorker: " +
    ("serviceWorker" in navigator ? "available" : "missing") +
    " — use this for features"
);
console.log(lines.join("\n"));
Try It Yourself

How It Works

Matches MDN advice: do not treat product as a real product name.

🚀 Common Use Cases

  • Learning Navigator history — understand why Chrome still says Gecko.
  • Legacy code review — spot brittle sniffing that checks product.
  • Interview / trivia — know the fixed compatibility strings.
  • Not for browser detection — never gate features on "Gecko".
  • Not for fingerprinting — the value is shared by nearly everyone.

🧠 How navigator.product Works

1

Spec requires a constant

HTML says the product getter returns "Gecko".

Spec
2

Browser exposes the string

Your script reads navigator.product.

Read
3

Legacy pages keep working

Old sniffing that expected Gecko still sees Gecko.

Compat
4

New code ignores it

Detect APIs instead of reading product labels.

📝 Notes

  • Baseline Widely available (MDN, since July 2015).
  • Not Deprecated, Experimental, or Non-standard — no status banner required.
  • Always "Gecko" — do not treat as a real product name.
  • Read-only string on Navigator.
  • Related: productSub, appCodeName, appName, Window.

Universal Browser Support

navigator.product is Baseline Widely available across modern browsers (MDN: since July 2015). Every conforming browser returns "Gecko" for compatibility — not for brand detection.

Baseline · Widely available

Navigator.product

Always "Gecko". Useful for understanding legacy sniffing — useless for identifying browsers in new code.

Universal Widely available
Google Chrome Returns "Gecko" · Desktop & Mobile
Full support
Mozilla Firefox Returns "Gecko" · Desktop & Mobile
Full support
Apple Safari Returns "Gecko" · macOS & iOS
Full support
Microsoft Edge Returns "Gecko" · Chromium
Full support
Opera Returns "Gecko" · Modern versions
Full support
Internet Explorer Legacy support for the compatibility string
Full support
product Excellent

Bottom line: Read navigator.product to learn the compatibility string, then ignore it for real feature decisions.

Conclusion

navigator.product is a Baseline compatibility string that always returns "Gecko". Learn it for legacy Navigator trivia, then prefer feature detection for real application logic.

Continue with productSub, appCodeName, or the JavaScript hub.

💡 Best Practices

✅ Do

  • Expect "Gecko" everywhere
  • Use feature detection for capabilities
  • Treat product as a legacy compatibility label
  • Document why old code checked this string
  • Prefer modern Capability / CSS checks

❌ Don’t

  • Gate features on product === "Gecko"
  • Assume it means Firefox / Gecko engine
  • Use it for fingerprinting
  • Try to assign to navigator.product
  • Confuse it with a real product marketing name

Key Takeaways

Knowledge Unlocked

Five things to remember about product

Always Gecko — compatibility label, not a brand detector.

5
Core concepts
🔁 02

Purpose

compatibility

Legacy
🚫 03

Sniffing

do not use

Avoid
🔒 04

Access

read-only

API
🎯 05

Prefer

feature detect

Modern

❓ Frequently Asked Questions

In every modern browser it returns the string "Gecko". The property exists only for historical compatibility with older scripts.
No. MDN marks it as Baseline Widely available (since July 2015). It is not Deprecated, Experimental, or Non-standard — but MDN still warns not to use it as a real product name.
No. Chrome, Edge, Safari, Firefox, and others all report "Gecko". It does not identify the real engine or brand.
The HTML specification requires the product getter to return "Gecko" for compatibility, similar to how appCodeName always returns "Mozilla".
No. It is a read-only Navigator property. You read it; you do not assign a new value.
Prefer feature detection (for example "serviceWorker" in navigator) over reading product, appCodeName, appName, or brittle user-agent parses.
Did you know?

Seeing product: "Gecko" next to appCodeName: "Mozilla" and appName: "Netscape" in Chrome DevTools is normal. Those fixed strings are intentional HTML compatibility requirements, not bugs.

Learn productSub Next

Date-like compatibility tokens — 20030107 or 20100101.

productSub →

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