User Agent特征库和探测工具

通过User Agent来检测客户端所用设备,各类语言都有, Mozilla整理了这样一个列表 ,这里clone一份,如下:

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 themeta bug, or track progress athttps://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

JavaScript

Multiple Languages

Perl

PHP

Python

Ruby

Server Detection Frameworks

 

 

http://cssor.com/user-agent-detection-libraries.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值