Example 1 — Read product
Log the current value.
console.log(navigator.product); How It Works
MDN: the value is always "Gecko" in any browser.

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.
Read-only property
"Gecko"
Compatibility only
Do not use
Widely available
Feature detection
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.
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.
product Propertyproduct is a read-only string on Navigator. Historically it related to engine / product labeling. Today it is a fixed compatibility value.
"Gecko" in conforming browsers.appCodeName and appName.General form of the property:
navigator.product "Gecko".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
} | Goal | Code |
|---|---|
| Read the value | navigator.product |
| Expected string | "Gecko" |
| Equality check | navigator.product === "Gecko" |
| Type | typeof navigator.product // "string" |
| Identify browser? | No — do not sniff with this |
| Better approach | Feature detection on APIs / CSS |
Four facts to remember about navigator.product.
"Gecko"Every browser
stringRead-only
legacyCompatibility
avoidNot a brand
product | appCodeName | Feature detection | |
|---|---|---|---|
| Typical value | "Gecko" | "Mozilla" | N/A |
| Identifies brand? | No | No | Checks capability |
| Reliability | Fixed compatibility string | Fixed compatibility string | High for APIs |
| Best for | Understanding legacy code | Understanding legacy code | Real application logic |
Examples follow MDN navigator.product behavior. Prefer Try It Yourself — you should see Gecko in any modern browser.
Read the fixed string and confirm it is always Gecko.
productLog the current value.
console.log(navigator.product); MDN: the value is always "Gecko" in any browser.
"Gecko"Show the equality check beginners expect from sniffing (and why it fails).
const isGeckoLabel = navigator.product === "Gecko";
console.log("product === \"Gecko\": " + isGeckoLabel);
console.log("This does NOT mean you are on Firefox."); The check is almost always true everywhere — so it cannot identify a browser brand.
Type checks, related legacy labels, and feature detection.
Beginner sanity check for the property type.
const lines = [
"value: " + navigator.product,
"typeof: " + typeof navigator.product
];
console.log(lines.join("\n")); You get a real string — just not a useful brand identifier.
Compare product with other fixed Navigator compatibility strings.
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."); Seeing this trio together makes the compatibility story obvious for beginners.
Keep product for learning; use capability checks for features.
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")); Matches MDN advice: do not treat product as a real product name.
product."Gecko".navigator.product WorksHTML says the product getter returns "Gecko".
Your script reads navigator.product.
Old sniffing that expected Gecko still sees Gecko.
Detect APIs instead of reading product labels.
"Gecko" — do not treat as a real product name.Navigator.navigator.product is Baseline Widely available across modern browsers (MDN: since July 2015). Every conforming browser returns "Gecko" for compatibility — not for brand detection.
Always "Gecko". Useful for understanding legacy sniffing — useless for identifying browsers in new code.
Bottom line: Read navigator.product to learn the compatibility string, then ignore it for real feature decisions.
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.
"Gecko" everywhereproduct === "Gecko"navigator.productproductAlways Gecko — compatibility label, not a brand detector.
"Gecko"
Valuecompatibility
Legacydo not use
Avoidread-only
APIfeature detect
ModernSeeing product: "Gecko" next to appCodeName: "Mozilla" and appName: "Netscape" in Chrome DevTools is normal. Those fixed strings are intentional HTML compatibility requirements, not bugs.
Date-like compatibility tokens — 20030107 or 20100101.
8 people found this page helpful