Compatibility/UADetectionLibraries: Difference between revisions

From MozillaWiki
Jump to navigation Jump to search
(I added a more current Java parser, the YAUAA, and also a parser for Scala)
 
(147 intermediate revisions by 5 users not shown)
Line 1: Line 1:
= User Agent Detection Libraries =
= User Agent Detection Libraries =


This is a list of User Agent detection libraries to be tested for compatibility with Firefox OS and Firefox for Android. This may also include general purpose JS libraries that include some kind of UA detection.
This is a list of [[UserAgent|User Agent]] detection libraries to be tested for [[Compatibility/Mobile|compatibility with]] Firefox OS and Firefox for Android. This may also include general purpose JS libraries that include some kind of UA detection.


The end goal is to contact these sites or (even better, in the case of open source libraries) provide patches so our mobile browsers are correctly identified as mobile (and not served desktop content or blocked outright).
The end goal is to '''contact these sites''' or (even better, in the case of open source libraries) '''provide patches''' so our mobile browsers are correctly identified as mobile (and not served desktop content or blocked outright).


NOTE: This page won't be actively updated anymore. You can watch the [https://bugzilla.mozilla.org/show_bug.cgi?id=915706 meta bug], or track progress at https://github.com/miketaylr/arewedetectableyet/.
'''UA strings to test with:'''


UA strings to test with:
Firefox Mobile for Android:
Firefox Mobile for Android:
* <code>Mozilla/5.0 (Android; Mobile; rv:23.0) Gecko/23.0 Firefox/23.0</code>
* <code>Mozilla/5.0 (Android; Mobile; rv:24.0) Gecko/24.0 Firefox/24.0</code>


Firefox OS:
Firefox OS phones:
* <code>Mozilla/5.0 (Mobile; rv:18.0) Gecko/18.0 Firefox/18.0</code>
* <code>Mozilla/5.0 (Mobile; rv:18.0) Gecko/18.0 Firefox/18.0</code>
Firefox OS tablets:
* <code>Mozilla/5.0 (Tablet; rv:29.0) Gecko/29.0 Firefox/29.0</code>
Some known Firefox OS UA strings with device ids (found in bugzil.la/873385):
* <code>Mozilla/5.0 (Mobile; ZTEOPEN; rv:18.1) Gecko/18.1 Firefox/18.1</code>
* <code>Mozilla/5.0 (Mobile; HUAWEIY300-F1; rv:18.1) Gecko/18.1 Firefox/18.1</code>
* <code>Mozilla/5.0 (Mobile; LG-D300; rv:18.1) Gecko/18.1 Firefox/18.1</code>
* <code>Mozilla/5.0 (Mobile; ALCATELOneTouch4012X; rv:18.1) Gecko/18.1 Firefox/18.1</code>
See also https://developer.mozilla.org/en-US/docs/Gecko_user_agent_string_reference#Firefox_OS_version_number.


== Libraries to be tested ==
== Libraries to be tested ==


=== JavaScript ===
* Dojo Toolkit https://github.com/dojo/ (see http://dojotoolkit.org/reference-guide/1.7/quickstart/browser-sniffing.html)
** Do we need to recommend a ffos or fxos token be added to the module? https://github.com/dojo/dojo/blob/master/sniff.js
=== Server Modules ===
* NetBiscuits http://www.netbiscuits.com/ (in contact via email.)
== Tested, issues reported in Bugzilla ==
'''Meta Bug: [https://bugzilla.mozilla.org/show_bug.cgi?id=915706 915706]'''


== Libraries known to be compatibile ==
=== Go ===
=== Go ===
* UserAgent https://github.com/mssola/user_agent
* UserAgent https://github.com/mssola/user_agent
* Woothee Go https://github.com/woothee/woothee-go


=== Java ===
=== Java ===
* UADetector https://github.com/before/uadetector
* UADetector https://github.com/before/uadetector
* User Agent Utils https://github.com/HaraldWalker/user-agent-utils
* User Agent Utils [https://bugzilla.mozilla.org/show_bug.cgi?id=915727 915727] *
* Woothee Java https://github.com/woothee/woothee-java
* YAUAA https://github.com/nielsbasjes/yauaa
 
=== Scala ===
* UA-Parser https://github.com/ua-parser/uap-scala


=== JavaScript ===
=== JavaScript ===
* UAParser.js https://github.com/faisalman/ua-parser-js
* Detect.js https://github.com/darcyclarke/Detect.js
* Detectizr [https://bugzilla.mozilla.org/show_bug.cgi?id=956998 Bug 956998] *
* Device.js [https://bugzilla.mozilla.org/show_bug.cgi?id=915853 915853] *
* Express Device https://npmjs.org/package/express-device
* isMobile https://github.com/kaimallea/isMobile
* is-mobile [https://bugzilla.mozilla.org/show_bug.cgi?id=914231 Bug 914231] *
* JS Redirection Mobile [https://bugzilla.mozilla.org/show_bug.cgi?id=932458 Bug 932458]*
* jQuery Mobile
* Mobile Agent https://github.com/fabdrol/mobileagent
* Mootools (https://github.com/mootools/mootools-core/blob/master/Source/Browser/Browser.js)
* Node User Agent Parse https://github.com/jujhars13/node-user-agent-parse
* Node User Agent Parse https://github.com/jujhars13/node-user-agent-parse
* Mobile Agent https://github.com/fabdrol/mobileagent
* Platform.js [https://bugzilla.mozilla.org/show_bug.cgi?id=913633 Bug 913633]
* ua-parser-js https://github.com/faisalman/ua-parser-js
* useragent https://github.com/3rd-Eden/useragent
* useragent https://github.com/3rd-Eden/useragent
* isMobile https://github.com/kaimallea/isMobile
* Woothee JS https://github.com/woothee/woothee-js
* platform.js https://github.com/bestiejs/platform.js
* YUI - http://yuilibrary.com/yui/docs/yui/yui-ua.html
* Express Device https://npmjs.org/package/express-device
* UA.js [https://bugzilla.mozilla.org/show_bug.cgi?id=913189 Bug 913189] *
* is-mobile https://npmjs.org/package/is-mobile (not widely used, but first result in NPM for "mobile")
* Dojo Toolkit https://github.com/dojo/ (see http://dojotoolkit.org/reference-guide/1.7/quickstart/browser-sniffing.html)
** Do we need to recommend a ffos or fxos token be added to the module? https://github.com/dojo/dojo/blob/master/sniff.js
* jQuery Mobile http://jquerymobile.com (FF for Android listed as A-grade support, FFOS not mentioned).
**TODO: run tests (https://github.com/jquery/jquery-mobile/blob/master/js/jquery.mobile.support.js)
* Mootools (https://github.com/mootools/mootools-core/blob/master/Source/Browser/Browser.js)
* Detect.js https://github.com/darcyclarke/Detect.js


=== Multiple Languages ===
=== Multiple Languages ===
* Woothee https://github.com/tagomoris/woothee
* ua-parser (multiple languages) https://github.com/tobie/ua-parser
* UA Parser https://github.com/tobie/ua-parser
* Mobile ESP http://blog.mobileesp.com/
* http://detectmobilebrowsers.com/
** Some ports of this are compatible, in contact with maintainer via email.
* detectmobilebrowsers.com [https://bugzilla.mozilla.org/show_bug.cgi?id=914241 Bug 914241*]
* Woothee https://github.com/woothee/woothee


=== Perl ===
=== Perl ===
* HTTP::BrowserDetect https://github.com/oalders/http-browserdetect
* HTTP::BrowserDetect https://github.com/oalders/http-browserdetect
* Woothee Perl https://github.com/woothee/woothee-perl


=== PHP ===
=== PHP ===
* Detector (Drupal) https://drupal.org/project/detector
* Categorizr https://github.com/bjankord/Categorizr (Note: no longer maintained)
* Mobile-Detect https://github.com/serbanghita/Mobile-Detect / http://mobiledetect.net/
* Detector (Drupal) https://drupal.org/project/detector / http://detector.dmolsen.com/
* PHP Mobile Detect http://code.google.com/p/php-mobile-detect/
* Mobile-Detect https://github.com/serbanghita/Mobile-Detect / http://mobiledetect.net/ / http://code.google.com/p/php-mobile-detect/
* Mobile Detect Bundle https://github.com/suncat2000/MobileDetectBundle
* PHP User Agent https://github.com/ornicar/php-user-agent
* PHP User Agent https://github.com/ornicar/php-user-agent
* PHP User Agent Parser https://github.com/donatj/PhpUserAgent
* PHP User Agent Parser https://github.com/donatj/PhpUserAgent
* PHP User Agent Parser https://bitbucket.org/hkgoldenmra/php-user-agent-parser
* Woothee PHP https://github.com/woothee/woothee-php
* Mobile Detect Bundle https://github.com/suncat2000/MobileDetectBundle
* WordPress Mobile Detect http://wordpress.org/plugins/wp-mobile-detect/
* WordPress Mobile Detect http://wordpress.org/plugins/wp-mobile-detect/
* Categorizr https://github.com/bjankord/Categorizr
* WPTouch (WordPress) [https://bugzilla.mozilla.org/show_bug.cgi?id=909420 Bug 909420]


=== Python ===
=== Python ===
* Python User Agents https://github.com/selwin/python-user-agents
 
* Django Mobile https://github.com/gregmuellegger/django-mobile
* Django Mobile https://github.com/gregmuellegger/django-mobile
* GoMobile (Plone) https://pypi.python.org/pypi/gomobile.mobile
* minidetector https://github.com/saschwarz/minidetector/network
* minidetector https://github.com/saschwarz/minidetector/network
* GoMobile (Plone) https://pypi.python.org/pypi/gomobile.mobile
* Python User Agents https://github.com/selwin/python-user-agents
* Woothee Python https://github.com/woothee/woothee-python


=== Ruby ===
=== Ruby ===
* user-agent https://github.com/visionmedia/user-agent/network
 
** note: TJ's lib is unmaintained but there appears to be a number of active forks.
* agent_orange https://github.com/kevinelliott/agent_orange
* agent_orange https://github.com/kevinelliott/agent_orange
* browser https://github.com/fnando/browser
* browser https://github.com/fnando/browser
* Mobvious https://github.com/jistr/mobvious
* Mobvious https://github.com/jistr/mobvious (uses MobileESP (ruby port is at least compatible)
* UserAgent https://github.com/josh/useragent
* UserAgent https://github.com/josh/useragent (makes no mobile/non-mobile distinction)
 
* User Agent Parser https://github.com/toolmantim/user_agent_parser
=== Server Modules ===
* Woothee Ruby https://github.com/woothee/woothee-ruby
* Apache Mobile Filter http://www.apachemobilefilter.org/
* (NGINX has a DeviceAtlas module)
* Detect Right http://detectright.com/
* NetBiscuits http://www.netbiscuits.com/
 
== Tested, issues reported in Bugzilla ==
* WPTouch (WordPress) [https://bugzilla.mozilla.org/show_bug.cgi?id=909420 Bug 909420]
* UA.js [https://bugzilla.mozilla.org/show_bug.cgi?id=913189 Bug 913189]
 
== Libraries known to be compatibile ==
=== JavaScript ===
* YUI - http://yuilibrary.com/yui/docs/yui/yui-ua.html
* ua-parser-js https://github.com/faisalman/ua-parser-js
 
=== Multiple Languages ===
* ua-parser (multiple languages) https://github.com/tobie/ua-parser


=== Server Detection Frameworks ===
=== Server Detection Frameworks ===
* Apache Mobile Filter [https://bugzilla.mozilla.org/show_bug.cgi?id=916250 916250]
* 51 Degrees http://51degrees.mobi/Products/DeviceDetection.aspx
* 51 Degrees http://51degrees.mobi/Products/DeviceDetection.aspx
* Device Atlas https://deviceatlas.com/device-data/user-agent-tester (it recognizes us as FFOS, but some of the data isn't quite accurate (says we dont support geolocation) and has some oddities like isBrowser: False (?)
* Detect Right http://detectright.com/
* DeviceAtlas https://deviceatlas.com/device-data/user-agent-tester  
* http://handsetdetection.com [https://bugzilla.mozilla.org/show_bug.cgi?id=957205 Bug 957205]
* OpenDDR http://openddr.org/
* WURFL (1.4) http://tools.scientiamobile.com/?user-agent-string=Mozilla%2F5.0+%28Mobile%3B+rv%3A18.0%29+Gecko%2F18.0+Firefox%2F18.0
* WURFL (1.4) http://tools.scientiamobile.com/?user-agent-string=Mozilla%2F5.0+%28Mobile%3B+rv%3A18.0%29+Gecko%2F18.0+Firefox%2F18.0


[[Category:Web Compatibility]]
[[Category:Web Compatibility|UA Detection]]

Latest revision as of 02:02, 12 February 2021

User Agent Detection Libraries

This is a list of User Agent detection libraries to be tested for compatibility with Firefox OS and Firefox for Android. This may also include general purpose JS libraries that include some kind of UA detection.

The end goal is to contact these sites or (even better, in the case of open source libraries) provide patches so our mobile browsers are correctly identified as mobile (and not served desktop content or blocked outright).

NOTE: This page won't be actively updated anymore. You can watch the meta bug, or track progress at https://github.com/miketaylr/arewedetectableyet/.


UA strings to test with:

Firefox Mobile for Android:

  • Mozilla/5.0 (Android; Mobile; rv:24.0) Gecko/24.0 Firefox/24.0

Firefox OS phones:

  • Mozilla/5.0 (Mobile; rv:18.0) Gecko/18.0 Firefox/18.0

Firefox OS tablets:

  • Mozilla/5.0 (Tablet; rv:29.0) Gecko/29.0 Firefox/29.0

Some known Firefox OS UA strings with device ids (found in bugzil.la/873385):

  • Mozilla/5.0 (Mobile; ZTEOPEN; rv:18.1) Gecko/18.1 Firefox/18.1
  • Mozilla/5.0 (Mobile; HUAWEIY300-F1; rv:18.1) Gecko/18.1 Firefox/18.1
  • Mozilla/5.0 (Mobile; LG-D300; rv:18.1) Gecko/18.1 Firefox/18.1
  • Mozilla/5.0 (Mobile; ALCATELOneTouch4012X; rv:18.1) Gecko/18.1 Firefox/18.1

See also https://developer.mozilla.org/en-US/docs/Gecko_user_agent_string_reference#Firefox_OS_version_number.

Libraries to be tested

JavaScript

Server Modules

Tested, issues reported in Bugzilla

Meta Bug: 915706

Libraries known to be compatibile

Go

Java

Scala

JavaScript

Multiple Languages

Perl

PHP

Python

Ruby

Server Detection Frameworks