JavaScript Navigator vendorSub Property

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

What You’ll Learn

navigator.vendorSub is a Baseline Navigator property. Per MDN, its value is always the empty string in any browser. Learn what that means, how it differs from vendor, five examples, and why sniffing with it is useless.

01

Kind

Read-only property

02

Returns

"" always

03

Baseline

Widely available

04

Purpose

Compatibility

05

Sniffing?

Useless

06

Prefer

Feature detection

Introduction

Next to navigator.vendor sits navigator.vendorSub — a companion “sub” field that sounds like it should hold a vendor version or subtitle.

In reality, MDN is crystal clear: the value is always the empty string, in any browser.

💡
Empty is still a string

vendorSub is not undefined or null. It is the empty string "", so typeof navigator.vendorSub === "string" and length is 0.

Learn it so legacy Navigator tables make sense — then ignore it for real app logic.

Understanding the vendorSub Property

Think of vendorSub as a reserved legacy slot that modern browsers keep empty for compatibility — similar in spirit to other fixed Navigator labels.

  • Always "" in conforming / mainstream browsers (MDN).
  • Read-only — you inspect, you do not assign.
  • Cannot identify Chrome, Firefox, Safari, or Edge.
  • Pair it with vendor only for learning: vendor may vary; vendorSub does not.
  • Related date-like sibling: productSub (not empty — returns fixed tokens).

📝 Syntax

General form of the property:

JavaScript
navigator.vendorSub

Value

  • The empty string ("").

Common patterns

JavaScript
console.log(navigator.vendorSub); // ""

// Always true in modern browsers:
const isEmpty = navigator.vendorSub === "";

console.log(typeof navigator.vendorSub); // "string"
console.log(navigator.vendorSub.length); // 0

// Prefer feature detection for real features:
if ("serviceWorker" in navigator) {
  // safe to use service workers
}

⚡ Quick Reference

GoalCode
Read vendorSubnavigator.vendorSub
Expected value""
Empty checknavigator.vendorSub === ""
Typetypeof navigator.vendorSub // "string"
Lengthnavigator.vendorSub.length // 0
Identify browser?No — always empty
Better approachFeature detection on APIs

🔍 At a Glance

Four facts to remember about navigator.vendorSub.

Value
""

Every browser

Kind
string

Read-only

Status
Baseline

Since Jul 2015

Sniffing
useless

Always empty

📋 vendor vs vendorSub vs productSub

vendorvendorSubproductSub
Typical value"Google Inc." / Apple / """" always"20030107" / "20100101"
Varies by browser?Yes (few cases)NoYes (two tokens)
Useful for sniffing?WeakNoNo
Best forLearning / coarse logsUnderstanding legacy APILegacy trivia

Examples Gallery

Examples follow MDN navigator.vendorSub behavior. Prefer Try It Yourself — you should see an empty string in any modern browser.

📚 Getting Started

Read the empty string and confirm it is always empty.

Example 1 — Read vendorSub

Log the current value (shown with JSON.stringify so empty is visible).

JavaScript
console.log(JSON.stringify(navigator.vendorSub));
Try It Yourself

How It Works

MDN: the value is always the empty string in any browser.

Example 2 — Always Equals ""

Show the equality check beginners might try for sniffing (and why it fails).

JavaScript
const isEmpty = navigator.vendorSub === "";
console.log("vendorSub === \"\": " + isEmpty);
console.log("This does NOT identify a browser brand.");
Try It Yourself

How It Works

The check is true everywhere — so it cannot tell browsers apart.

📈 Practical Patterns

Type checks, compare with vendor, and prefer feature detection.

Example 3 — Type and Length

Confirm empty is still a string with length 0.

JavaScript
const v = navigator.vendorSub;
const lines = [
  "value: " + JSON.stringify(v),
  "typeof: " + typeof v,
  "length: " + v.length,
  "is undefined?: " + (v === undefined),
  "is null?: " + (v === null)
];
console.log(lines.join("\n"));
Try It Yourself

How It Works

Beginners often confuse empty string with missing. Here the property exists and is intentionally blank.

Example 4 — Compare with vendor

Show that vendor can vary while vendorSub stays empty.

JavaScript
const lines = [
  "vendor: " + JSON.stringify(navigator.vendor),
  "vendorSub: " + JSON.stringify(navigator.vendorSub),
  "productSub: " + JSON.stringify(navigator.productSub)
];
console.log(lines.join("\n"));
console.log("vendorSub stays empty even when vendor is not.");
Try It Yourself

How It Works

Side-by-side logging makes the “always empty” rule obvious for beginners.

Example 5 — Prefer Feature Detection

Keep vendorSub for trivia; use capability checks for features.

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

How It Works

An empty compatibility field cannot drive feature decisions — APIs can.

🚀 Common Use Cases

  • Learning Navigator history — know why the property exists but stays blank.
  • Legacy code review — spot useless checks on vendorSub.
  • Interview / trivia — “What does vendorSub return?” → always "".
  • Not for browser detection — empty everywhere.
  • Not for versioning — there is no vendor subtitle to parse.

🧠 How navigator.vendorSub Works

1

Spec / engines keep an empty value

MDN: always the empty string in any browser.

Empty
2

Script reads the property

navigator.vendorSub returns "".

Read
3

Same result everywhere

Chrome, Firefox, Safari, Edge — still empty.

Universal
4

New code ignores it

Detect APIs instead of reading vendorSub.

📝 Notes

  • Baseline Widely available (MDN, since July 2015).
  • Not Deprecated, Experimental, or Non-standard — no status banner required.
  • Always the empty string "" in any browser (MDN).
  • Read-only string on Navigator.
  • Related: virtualKeyboard, vendor, productSub, product.

Universal Browser Support

navigator.vendorSub is Baseline Widely available across modern browsers (MDN: since July 2015). Every browser returns the empty string "" — useful for learning, useless for brand detection.

Baseline · Widely available

Navigator.vendorSub

Always "". A legacy companion to vendor that never carries a subtitle in modern browsers.

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

Bottom line: Read navigator.vendorSub once to confirm it is empty, then ignore it for real feature decisions.

Conclusion

navigator.vendorSub is a Baseline compatibility string that is always empty. Learn it so Navigator docs make sense, remember it cannot identify browsers, and prefer feature detection for real application logic.

Continue with virtualKeyboard, vendor, or the JavaScript hub.

💡 Best Practices

✅ Do

  • Expect "" everywhere
  • Treat it as a legacy compatibility field
  • Use JSON.stringify when logging so empty is visible
  • Prefer feature detection for capabilities
  • Compare with vendor only for learning

❌ Don’t

  • Gate features on vendorSub
  • Confuse empty string with undefined
  • Assume a hidden vendor version exists here
  • Assign to navigator.vendorSub
  • Use it for fingerprinting

Key Takeaways

Knowledge Unlocked

Five things to remember about vendorSub

Always empty — Baseline compatibility string, not a brand detector.

5
Core concepts
🔁 02

Everywhere

same empty

MDN
🔒 03

Access

read-only

API
🚫 04

Sniffing

useless

Avoid
🎯 05

Prefer

feature detect

Best

❓ Frequently Asked Questions

Per MDN, the value is always the empty string ("") in any browser.
No. MDN marks it Baseline Widely available (since July 2015). It is not Deprecated, Experimental, or Non-standard.
No. It is a read-only Navigator property. You read it; you do not assign a new value.
vendor can be "Google Inc.", "Apple Computer, Inc.", or "" (Firefox). vendorSub is always "" in every browser.
productSub returns date-like tokens such as "20030107" or "20100101". vendorSub is always empty.
No. An always-empty string cannot identify a browser. Prefer feature detection for capabilities.
Did you know?

Firefox’s navigator.vendor is also empty, but that is a Firefox-specific vendor quirk. vendorSub is empty in every browser — including Chrome and Safari, where vendor is not empty.

Learn virtualKeyboard Next

Experimental API for on-screen keyboard geometry and overlays.

virtualKeyboard →

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