如何阅读用户代理详细信息 [英] How to read useragent details

查看:70
本文介绍了如何阅读用户代理详细信息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是我的用户代理

Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.31 (KHTML, like Gecko) Chrome/26.0.1410.64 Safari/537.31

我知道我在使用chrome,所以我知道来自 chrome版本26 。但是其余信息是什么?

I know I am using chrome, so I understand it is from chrome version 26. But what is the rest of the information?

我如何读取字符串。而我能从userAgent那里收集到什么呢?

How can I read the string. And what all I can collect from userAgent?

解析userAgent并读取其中的每个属性的最佳方法是什么?

What is the best way to parse the userAgent and read each property in it?

推荐答案

用户代理字符串提供有关应用程序类型,操作系统,软件供应商/版本和布局呈现引擎的信息。

User Agent string provide information on application type, operating system, software vendor / version and layout rendering engine.

根据浏览器,您还将获得其他信息。 IE提供的功能令牌包含有关.NET运行时版本的信息。您可以在此处了解有关IE特定令牌的更多信息- http: //msdn.microsoft.com/zh-cn/library/ms537503(v=vs.85).aspx

Depending on browser you would also get additional information. IE provides Feature Tokens that contains information about .NET runtime versions. You can learn more about IE specific tokens here - http://msdn.microsoft.com/en-us/library/ms537503(v=vs.85).aspx

不确定是否需要此功能但肯定会帮助您了解如何解码用户代理字符串- http://www.texsoft.it/index.php?c=software&m=sw.php.useragent&l=it

Not sure if you would need this but will surely help to understand how user agent strings are decoded - http://www.texsoft.it/index.php?c=software&m=sw.php.useragent&l=it

这篇关于如何阅读用户代理详细信息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆