JavaScript Navigator product Property

Beginner
5 min read
Updated: Nov 2026
3 examples
Property

Definition

navigator.product is a read-only string that is always "Gecko" in any browser. It exists only for historical compatibility (MDN).

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

Syntax

Use navigator.product. Start with this line.

JavaScript
navigator.product
CallWhat it does
navigator.productPrimary signature.

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

Library declarations
JavaScript
navigator.product

Parameters

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

Return Value

Return ValueDescription
*The current value of navigator.product.

JavaScript Examples

Example 1 — Read navigator.product

Log the value in the current browser.

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

How It Works

  1. Read the property. No arguments — just access navigator.product.
  2. Fixed string. The HTML spec requires "Gecko".
  3. Compatibility. Kept so old scripts that read it do not break.
  4. Read-only. You inspect the value; you do not assign to it.

Example 2 — Prove It Is Always "Gecko"

Show that equality checks against "Gecko" are always true here.

JavaScript
const value = navigator.product;
console.log(value);
console.log(value === "Gecko");
console.log("Useful for sniffing? " + false);
Try It Yourself

How It Works

  1. Store the value. Almost always "Gecko".
  2. Compare. === "Gecko" is true across brands.
  3. Lesson. A constant cannot identify Chrome vs Firefox.
  4. MDN rule. Do not rely on this as a real product name.

Example 3 — Prefer Feature Detection

Test the capability instead of reading legacy identity strings.

JavaScript
// ✗ brittle: if (navigator.product === "Gecko") { … }

// ✓ reliable: test the API
if ("serviceWorker" in navigator) {
  console.log("Service Worker API available");
} else {
  console.log("Service Worker API missing");
}

console.log("product (info only): " + navigator.product);
Try It Yourself

How It Works

  1. Skip sniffing. product does not name the real engine.
  2. Test the feature. "serviceWorker" in navigator answers the real question.
  3. Fallback path. Handle missing APIs without guessing the browser.
  4. Optional log. Keep product for learning or diagnostics only.

Browser Support

navigator.product is Baseline Widely available (MDN: since July 2015). Support is excellent — the hard part is remembering it always returns "Gecko".

✓ Baseline · Widely available

Navigator.product

Read-only compatibility string fixed to "Gecko" in every browser. Useful for learning legacy Navigator identity fields — not for brand or engine sniffing.

100% Browser support
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 Supported (legacy)
Full support
product Universal

Bottom line: Available everywhere modern users are. Read it for demos; decide features with capability checks, not product strings.

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

Next: productSub

Continue with the next Navigator property in the JavaScript guide.

productSub 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.

10 people found this page helpful