jQuery.browser (alias $.browser) was a plain object of flags read from navigator.userAgent — browser class booleans plus $.browser.version for the rendering engine (added in jQuery 1.0 / 1.1.3).
Only for reading old code — do not add new UA sniffing.
Confirm you are on jQuery ≤ 1.8, or load jQuery Migrate with 1.9+.
Read a flag such as $.browser.webkit or $.browser.msie.
Optionally read $.browser.version for the engine version string.
Plan a rewrite: replace the branch with a real feature / capability check.
Piece
Required?
Role
$.browser
Yes (legacy)
Flags object from the user agent
$.browser.version
Optional
Rendering engine version string
Modern path
Preferred
Feature detection, not browser names
Pseudocode
Pseudocode
// Legacy (removed in jQuery 1.9):
ua = navigator.userAgent
$.browser = parse flags from ua // msie / mozilla / webkit / opera
$.browser.version = engine version string
if $.browser.webkit:
// old browser-specific branch
else if $.browser.msie:
// another branch
// Modern replacement idea:
if CSS.supports("display", "flex"):
use flex layout
if typeof fetch === "function":
use fetch API
Reference
Cheat Sheet
Keep these facts handy while reading legacy jQuery browser sniffing.
Print. Log name : value for msie/mozilla/webkit/opera/version.
Note. Exact flags depend on the current user agent.
Example 2 — Official: msie and version
Check Internet Explorer and read the engine version string.
jQuery
console.log($.browser.msie); // true only on old IE UA
console.log($.browser.version); // engine version string
if ($.browser.msie) {
console.log("IE engine: " + $.browser.version);
}
Missing API. On jQuery 3.x, typeof $.browser is "undefined".
CSS test.CSS.supports answers “can I use flex?” without naming the browser.
API test. Check fetch (or any feature) the same way.
Rule. Capability checks survive new browsers; UA sniffing does not.
Edge Cases & Pitfalls
Check these before relying on any user-agent sniff in plugins.
removed
Gone since jQuery 1.9
Accessing $.browser on modern jQuery throws or returns undefined. Use Migrate only as a temporary bridge.
spoof
User agents lie
Browsers and users can spoof navigator.userAgent. Never trust name sniffing for security or critical behavior.
ie
IE Compatibility View
IE8 in Compat View claimed to be 7. Version strings from $.browser.version were often wrong.
safari
safari flag is deprecated
Prefer the webkit flag in legacy code — and prefer feature tests in new code.
Compatibility
Browser Support
jQuery.browser existed in jQuery 1.0–1.8 (deprecated from 1.3). It was removed in jQuery 1.9 and is absent from jQuery 2.x/3.x unless you load jQuery Migrate.
✓ Removed · jQuery 1.9
jQuery.browser
Only in jQuery 1.0–1.8 (or Migrate). Modern Chrome/Firefox/Safari/Edge with jQuery 3.x do not expose $.browser. Prefer feature detection.
LegacyjQuery ≤ 1.8 only
Google ChromeAll versions · Desktop & Mobile
Full support
Mozilla FirefoxAll versions · Desktop & Mobile
Full support
Apple SafariAll versions · macOS & iOS
Full support
Microsoft EdgeAll versions · Chromium & Legacy
Full support
Internet ExplorerIE 6+ · Legacy environments
Full support
OperaAll modern versions
Full support
$.browserRemoved 1.9+
Bottom line: Do not use $.browser in new projects. Read it only in legacy code, restore temporarily with Migrate, then switch to feature detection.
Analysis
Performance Notes
Approach
Cost
Best for
$.browser.*
O(1) read
Legacy code only
CSS.supports(...)
O(1)
CSS capability checks
"fetch" in window
O(1)
API availability checks
Speed is not the problem — correctness is. Feature tests stay valid as browsers change; UA sniffing does not.
Remember
Key Takeaways
Role: legacy UA flags + $.browser.version.
Status: deprecated 1.3, removed 1.9.
Risk: spoofable user-agent strings.
Replace with: feature detection (CSS.supports, API checks).
One line: learn $.browser to read old jQuery — ship feature detection, not user-agent sniffing.
Frequently Asked Questions
jQuery.browser was a plain object of Boolean flags parsed from navigator.userAgent — msie, mozilla, webkit, opera, and the deprecated safari flag. jQuery.browser.version held the rendering engine version string. Added in jQuery 1.0.
No in stock jQuery 1.9+. It was deprecated in 1.3 and removed in 1.9. jQuery 3.x does not include $.browser unless you load the jQuery Migrate plugin, which restores it for legacy code.
User-agent sniffing is unreliable — strings can be spoofed, compatibility modes lie, and new browsers break if/else chains. jQuery recommends feature detection instead of browser names.
A string reporting the rendering engine version from the user agent (for example Gecko for Firefox). It was removed with $.browser in 1.9 and has the same spoofing problems as the flags.
$.browser guessed the browser from the user-agent string. $.support ran feature tests for DOM/CSS quirks. Prefer feature detection for new code; treat both as legacy APIs when reading old tutorials.
Detect capabilities: CSS.supports() for CSS, "fetch" in window for APIs, and progressive enhancement. Use jQuery Migrate only while rewriting old plugins that still sniff $.browser.