通过HTTP请求的user-agent判断用户设备

红字是用来判断设备的关键词


1、web-win

User-Agent: Mozilla/5.0 ( Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/31.0.1650.57 Safari/537.36
2、web-mac
User-Agent: Mozilla/5.0 ( Macintosh; Intel Mac OS X 10_9_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/31.0.1650.63 Safari/537.36
3、web-ipad
User-Agent: Mozilla/5.0 ( iPad; CPU OS 7_0_4 like Mac OS X) AppleWebKit/537.51.1 (KHTML, like Gecko) Version/7.0 Mobile/11B554a Safari/9537.53
4、wap-ios
User-Agent: Mozilla/5.0 ( iPhone; CPU iPhone OS 7_0_4 like Mac OS X) AppleWebKit/537.51.1 (KHTML, like Gecko) Version/7.0 Mobile/11B554a Safari/9537.53
5、wap-android
User-Agent: Mozilla/5.0 (Linux; U; Android 4.1.2; zh-CN; SCH-R530U Build/JZO54K) AppleWebKit/534.31 (KHTML, like Gecko) UCBrowser/9.3.2.349 U3/0.8.0 Mobile Safari/534.31
6、weixin

User-Agent: Mozilla/5.0 (iPhone; CPU iPhone OS 7_0_4 like Mac OS X) AppleWebKit/537.51.1 (KHTML, like Gecko) Mobile/11B554aMicroMessenger/5.0.3


其中安卓设备未筛选安卓平板、微信使用自己的特殊表示MicroMessenger

你可能感兴趣的:(通过HTTP请求的user-agent判断用户设备)