ua-browser
1.4.5
Patch Changes
- Added 10 foreign app webview detections: Instagram, Facebook, Twitter/X, TikTok (International), Snapchat, LinkedIn, Pinterest, Reddit, LINE, WhatsApp
- Added
probeIOS26Version(): detects the exact iOS 26.x minor version via CSS/JS feature probes (26.0–26.5) getEnvContext()now setsisIOS26Plusvia CSS feature detection; automatically corrects frozenosVersionto'26'- Extended iOS
Version/override to all third-party browsers (fixes Opera and others showing 18.7) - Fixed Firefox Focus iOS detection: newer versions dropped
Focus/token; now detected viaFxiOS/+ noSafari/ - Fixed Brave false detection: check moved after 360 disambiguation, restricted to
browser === 'Chrome' || 'Safari' - Added 360 Mobile iOS detection via
window__$_qihoo360_$__window properties - Split
UCMobileinto its own'UCMobile'entry (distinct from international'UC')
1.4.4
Patch Changes
- Fixed iOS WKWebView detection: changed
Version\/to\bVersion\/(word boundary) to preventosee2unifiedReleaseVersion/(Zhihu iOS) from being treated as aVersion/token, which causedisWebviewto incorrectly returnfalse - Fixed Zhihu (
Zhihu) iOS version extraction: now usesosee2unifiedReleaseVersion/token (real version number) instead ofosee2unifiedRelease/(build number) - Fixed Ctrip (
Ctrip) detection: narrowedCtrip\/toCtrip\/[\d]to avoid matching non-version path tokens - Fixed WeRead (
WeRead) detection: narrowed(WeRead|wxread)\/to(WeRead|wxread)\/[\d]to avoid matching non-version tokens
1.4.3
Patch Changes
- Added 15 app webview detections: Pinduoduo (
Pinduoduo), Tmall (Tmall), Eleme (Eleme), Xianyu (Xianyu), Zhihu (Zhihu), NetEase Cloud Music (NetEaseMusic), NetEase News (NetEaseNews), Tencent Video (TencentVideo), Youku (Youku), Ctrip (Ctrip), WeRead (WeRead), Dianping (Dianping), Mafengwo (Mafengwo), Maoyan (Maoyan), WPS Office (WPSOffice) - Extended JD detection: in addition to the original
jdpingou(JingXi), added support for the main appjdapptoken WeReadnow matches the legacywxread/token;Zhihunow matches the iOSosee2unifiedRelease/tokenNetEaseNewsuses the more specificNTESnr/token to reduce false positives against other "News" apps
1.4.2
Patch Changes
- Added
Claude-UserandClaude-SearchBotdetection (Anthropic real-time browsing and search indexing crawlers) - Added
MistralAI-Userdetection (Mistral Le Chat real-time web retrieval) - Added
DeepSeekBotdetection (DeepSeek AI crawler) - Added
XAI-Crawlerdetection (xAI / Grok crawler) - Fixed
AdsBotcategory:ai-llm→search-engine(Google Ads crawler, unrelated to AI/LLM)
1.4.1
Patch Changes
- Fixed Firefox Nightly detection — now uses the
a1version suffix in the UA string instead of defunct environment variable checks - Fixed Pinterest Bot false positives — narrowed
/Pinterest/to/Pinterestbot/ito avoid matching the Pinterest app - Fixed HarmonyOS version mapping — added Android 14 → HarmonyOS 4 entry
- Fixed language detection missing single-segment codes (e.g.
en,zh) — added ISO 639-1 allowlist to avoid matching architecture tokens - OS detection now uses explicit
priorityfields instead of relying on list order parseHeadersnow parsesSec-CH-UA-Full-Version-List— SSR can return the real browser full versionparseHeadersdetects Brave browser from the low-entropySec-CH-UAbrand header- Added
BravetoBRAND_TO_BROWSERto cover thehighEntropyData.fullVersionListpath - Removed unimplemented
Wechat Miniapptype definition - Removed unsafe generic
as BrowserNamecast
1.4.0
Minor Changes
- Six new
EnvOptionfields, bridging the gap with ua-parser-js / device-detector-js:vendor+model: device manufacturer and model (e.g. Samsung/SM-G991B, Apple/iPhone); covers 17 vendorsbrowserType: browser category ('browser' | 'brand' | 'app' | 'unknown')engineVersion: rendering engine version (e.g.'537.36','605.1.15')osVersionName: human-readable OS version name (e.g.'Sonoma','Windows 11')botCategory: bot classification ('search-engine' | 'ai-llm' | 'social' | 'link-preview' | 'seo-tool' | 'monitoring' | 'generic' | 'unknown')
- Standalone detector enhancements:
detectBrowser()returnsbrowserType,detectEngine()returns{ engine, engineVersion },detectOS()returnsosVersionName,detectBot()returnsbotCategory; newdetectVendorModel()export - New type exports:
BotCategory,BrowserType,VendorModelResult - Bot detection expansion: 9 new AI/LLM crawlers (
Applebot-Extended,OAI-SearchBot,ChatGPT-User,Google-Extended,Meta-ExternalAgent,Amazonbot,Diffbot,cohere-ai,YouBot); newcustomBotDefsoption for injecting custom bot rules - Browser: Added Arc and Brave detection (Brave requires runtime API)
- OS: Added visionOS and tvOS detection
- Device: Added
Console(PlayStation, Xbox, Nintendo Switch) andXR(Apple Vision Pro, Meta Quest) device types - Language detection: Recognizes
Language/xx_XXformat from UA strings; supports 3-part BCP47 tags (common in WeChat, Alipay, etc.) - UA freeze defense: Uses Client Hints
fullVersionListfor accurate version when available (Chrome, Edge, Opera, Vivaldi) - New
EnvOptionfields:versionMajor(browser major version as number),connectionType(network type)
Patch Changes
- Added standalone exports:
detectEngine(),detectDevice() - Removed redundant re-detect button from Playground
Breaking Changes
- Removed
DetectStrategy,strategyoption, andconfidencefield
1.3.1
Patch Changes
- Added
uaBrowser.detect()async API with optimizedEnvContextconstruction
1.3.0
Minor Changes
- Removed miniapp runtime detection (
isWechatMiniappetc.) due to inconsistent web-view injection behavior across platforms; to be re-implemented after further validation
1.2.0
Minor Changes
- Added detection for 7 mainstream app WebViews (Bilibili, Kuaishou, Xiaohongshu, Feishu, Toutiao, JD, Meituan). Added miniapp runtime detection across 6 platforms (WeChat, Alipay, Baidu, Douyin, QQ, Kuaishou). Added TV device type and Android tablet rules. Added Tizen/KaiOS OS detection. Added Samsung Internet/DuckDuckGo/Puffin browser detection. Added AI crawler detection (GPTBot, ClaudeBot, etc.). Removed 5 discontinued browsers.
1.1.0
Minor Changes
Introduced multi-signal fusion detection architecture (v1.1.0):
getEnvContext()collects all browser environment signals in one pass (WebGL, Client Hints, font probing, CSS media features)ParseOptions.ctxfeeds EnvContext intoparseUA()for multi-signal detectionparseHeaders()+ACCEPT_CHconstant for server-side HTTP Client Hints detection (SSR scenarios)detectArch()upgraded to a 4-tier priority chain (Client Hints → WebGL → platform → UA string)isWebview()now detects iOS WKWebView (complementing existing Android;wvlogic)- HarmonyOS Next (5.0+) version extracted directly, no longer dependent on Android compatibility layer version
- Added HarmonyOS version mapping (Android 11→3, 12→3, 13→4)
- Added OpenHarmony OS detection (independent OsName)
- Added ArkWeb engine detection
1.0.2
Patch Changes
Fix OS detection order bugs and iOS Safari version parsing
- Fix Chrome OS misidentified as Linux (Chrome OS UA contains X11)
- Fix HarmonyOS misidentified as Android (HarmonyOS UA contains Android)
- Fix Windows Phone misidentified as Windows (Windows Phone UA contains Windows)
- Fix iOS 26+ Safari osVersion showing frozen value (18.7) instead of real version from Version/ token
- Fix Playground mobile layout: reduce padding for two-column result grid on small screens
1.0.1
Patch Changes
Added browser, bot, and OS detection support; improved docs and i18n
- Added browser detection: Samsung Internet, DuckDuckGo, Puffin
- Added AI bot detection: GPTBot, ClaudeBot, PerplexityBot, CCBot, AdsBot
- Added OS detection: Tizen, KaiOS
- Added device type: TV (Smart TV); fixed Android tablet misidentification
- Added headless detection markers: jsdom, Selenium, Playwright
- Playground supports Chinese / English UI switching
- Added full English VitePress documentation site (i18n)
1.0.0
Major Changes
Full architecture rewrite — modular pure-function design.
Breaking Changes
result.platfrom(typo) renamed toresult.platform- Removed
EnvParttype — useEnvOptiondirectly - Removed singleton class — replaced by pure function
parseUA(ua, options?)
New Features
parseUA(ua, options?)— pure function, ideal for SSR / Node.jsgetNavContext()— reads realnavigator, safely degrades in Node.jsgetWindowsVersion(nav)— async accurate Windows 10 / 11 detectiondetectBot(ua)— standalone bot detector, returns{ isBot, botName }detectArch(ua)— standalone CPU architecture detectordetectHeadless(ua)— standalone headless browser detectorgetLanguage(nav)— extracts normalized language code fromNavContextVERSION— exports current library version- Named exports with tree-shaking support
NavContextinjection eliminates global side effects; all detectors testable in Node.js
Detection Enhancements
- Added browsers: Samsung Internet, DuckDuckGo, Puffin
- Added OS: Tizen, KaiOS
- Added device type:
TV(Smart TV) - Android without
Mobilemarker now correctly identified as Tablet - Added AI bot detection: GPTBot, ClaudeBot, PerplexityBot, CCBot, AdsBot
- Added headless markers: jsdom, Selenium, Playwright
Build System
- Migrated from Rollup + Babel + shelljs to tsup + TypeScript 5
- Output formats: ESM (
.mjs), CommonJS (.cjs), IIFE (.min.js), type declarations (.d.ts/.d.cts) - Added Vitest test suite
0.1.9
Patch Changes
- Fixed version parsing edge cases