JavaScript Navigator vendorSub Property

Beginner
5 min read
Updated: Nov 2026
3 examples
Property

Definition

navigator.vendorSub is a read-only property that always returns the empty string ("") in any browser (MDN). It remains for legacy / compatibility — not for useful vendor details.

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

Syntax

Use navigator.vendorSub. Start with this line.

JavaScript
navigator.vendorSub
CallWhat it does
navigator.vendorSubPrimary signature.

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

Library declarations
JavaScript
navigator.vendorSub

Parameters

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

Return Value

Return ValueDescription
*"" (empty string)

JavaScript Examples

Example 1 — Read vendorSub

Confirm the value is the empty string (MDN).

JavaScript
console.log(navigator.vendorSub);
console.log(JSON.stringify(navigator.vendorSub)); // ""
console.log(navigator.vendorSub.length);           // 0
Try It Yourself

How It Works

  1. Read the property. No arguments — returns a string immediately.
  2. Expect empty. MDN: always "" in any browser.
  3. Use JSON.stringify. Makes empty strings visible in console output.
  4. Check length. Should be 0.

Example 2 — Compare with vendor and productSub

See which related legacy fields actually carry values.

JavaScript
console.log("vendor:", JSON.stringify(navigator.vendor));
console.log("vendorSub:", JSON.stringify(navigator.vendorSub));
console.log("productSub:", JSON.stringify(navigator.productSub));
Try It Yourself

How It Works

  1. Read three fields. Same Navigator “identity” family.
  2. vendor may vary. Chromium / Safari / Firefox differ (MDN).
  3. vendorSub stays empty. No browser-specific content.
  4. productSub often has tokens. Still not a good feature gate.

Example 3 — Feature Detection Instead

Ignore vendorSub for decisions — ask for the capability you need.

JavaScript
// Avoid: if (navigator.vendorSub) { … }  // always falsy

if ("serviceWorker" in navigator) {
  console.log("Service workers supported");
} else {
  console.log("Service workers not supported");
}

console.log("vendorSub length:", navigator.vendorSub.length); // 0
Try It Yourself

How It Works

  1. Skip empty checks. vendorSub is always falsy as a condition.
  2. Detect the API. Capability checks answer “can I use this?”
  3. Log length optionally. Confirms the empty-string contract.
  4. Keep a fallback. Progressive enhancement beats legacy sniff fields.

Browser Support

Navigator.vendorSub returns a string that is always empty. MDN marks it Baseline Widely available (since July 2015). Not Deprecated, Experimental, or Non-standard.

✓ Baseline Widely available

Navigator.vendorSub

Present in all modern browsers. The return value is "" everywhere — a compatibility stub, not a useful identifier.

Baseline Widely available
Google Chrome "" (empty)
Yes
Microsoft Edge "" (empty)
Yes
Mozilla Firefox "" (empty)
Yes
Apple Safari "" (empty)
Yes
Opera "" (empty)
Yes
Internet Explorer "" (empty)
Yes
vendorSub Always ""

Bottom line: Safe to read; never useful for sniffing. See the MDN vendorSub reference.

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.

Next: virtualKeyboard

Learn how navigator.virtualKeyboard accesses the VirtualKeyboard API.

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

9 people found this page helpful