| Name | Modified | Size | Downloads / Week |
|---|---|---|---|
| Parent folder | |||
| README.md | 2026-09-28 | 4.4 kB | |
| v2.4.0 source code.tar.gz | 2026-09-28 | 134.0 kB | |
| v2.4.0 source code.zip | 2026-09-28 | 154.6 kB | |
| Totals: 3 Items | 293.0 kB | 0 | |
Minor Changes
-
#420
ae62c7bThanks @matthewhudson! - Improve device detection, measured against the Matomo device-detector fixtures (35,777 user agents): correctly typed user agents go from 84% to 89%. -
Android TV. Android TVs, Google TV, Fire TV, Chromecast, Sony Bravia, Xiaomi Mi TV and Android set-top boxes were detected as Android tablets (or phones).
device.television()is now true for them,device.androidPhone(),device.androidTablet(),device.mobile()anddevice.tablet()are false,device.typeis'desktop'as for every television, and the<html>classes areandroid televisioninstead ofandroid tablet.device.osstays'android'. Detection went from 2% to 48% of the Android TV fixtures; the rest only carry a bare model number. - Other televisions. Vizio SmartCast, Hisense VIDAA, Opera TV, Vestel-based sets and TVs running Opera's OMI browser were detected as Linux desktops. They now report
os: 'television'. - Feature phones and other handsets. Java ME (MIDP/CLDC), Symbian, Nokia Series 40/60, MediaTek MAUI, Openwave and WAP browsers, UC Browser and Opera Mini, NTT DoCoMo, Samsung Bada, Tizen, Sailfish and Palm webOS phones were detected as desktops.
device.mobile()is now true for them,device.typeis'mobile'and<html>gets themobileclass;device.osis'unknown'. Linux-based phones (Tizen, Sailfish) no longer count asdevice.linux(). - Android tablets whose browser says "Mobile". Chrome adds "Mobile" on screens narrower than 600dp, which includes many 7" and 8" tablets. Well-known tablet families (Galaxy Tab
SM-T/SM-P/SM-X, LenovoTB-, "Tab 3", Huawei MediaPad/MatePad, Kindle Fire, and the/apadtoken of Yandex apps) are now tablets. Android tablet detection went from 81% to 85%. - Android apps on Chromebooks (an Android user agent naming the Chromebook) were Android tablets. They now report
os: 'chromeos',type: 'desktop'and thechromeos desktopclasses;device.android()stays true. - Windows Mobile and Windows CE handsets (
IEMobile,Windows CE) and Internet Explorer on Windows Phone 8.1 in desktop mode (WPDesktop, previously a Windows tablet) are now Windows phones. - Fix: a TV whose maker name contains "mac" (Atmaca/Sunny) was detected as macOS.
Known limitation: a phone whose model name contains "TV" as a separate word (for example "KAZAM TV 45") is now detected as a television.
Patch Changes
-
#420
ae62c7bThanks @matthewhudson! - Fix five long-standing detection reports: -
iPhone in "Request Desktop Website" mode (#363) was an iPad: Safari sends the Mac user agent, and the touchscreen check could not tell the two apart. The screen size now does: a phone-sized screen is
iphone()/mobile(), an iPad-sized (or unknown) one staysipad()/tablet(). - iPad inside a Cordova app that reports an iPhone user agent (#106) is now
ipad()/tablet()when the screen is iPad-sized. - Huawei and Honor tablets whose user agent only carries a model code such as
VRD-W09orBAH4-W09and saysMobile(#362) were phones. Model codes ending in-W09(Wi-Fi tablets; phones use-L09/-AL00) are now tablets. A HarmonyOS tablet in that situation also got theharmonyos mobileclasses whiledevice.typewas'tablet'; the classes now followdevice.type. - Foldable phones unfolded (#332): Chrome drops
Mobileon the wide inner screen, so a Galaxy Z Fold or Pixel Fold was a tablet. Both families are now phones whatever the fold state. - Windows touch-screen laptops in Internet Explorer (#64) were tablets because IE said
Touchon every touch device.windowsTablet()now also requiresARM, i.e. a Windows RT device (#89). Modern browsers on Windows never sayTouch, so a Surface in Edge, Chrome or Firefox staysdesktop, as before.
The README gains a "Limitations" section that covers these cases and that device.type/device.os are computed once at import and do not follow window resizes (#273).