- 浏览: 429971 次
- 性别:
- 来自: 北京
文章分类
- 全部博客 (144)
- java (32)
- Flex (11)
- linux (15)
- 思维至上 (2)
- 生活 (4)
- spring2.5.5 (3)
- Design pattern (0)
- jdk1.6 (1)
- erlang (14)
- mysql (5)
- nginx (10)
- 互联网 (1)
- 用户体验 (0)
- jvm (8)
- hibernate (0)
- oracle (0)
- mvn (2)
- 23种常用设计模式详细讲解及实例 (1)
- nosql (1)
- mongodb (2)
- thrift (1)
- 负载均衡 (1)
- Objective-c (1)
- fuck (1)
- resin (3)
- log4j (2)
- android (1)
- jps (0)
- lucene (2)
- rsync (1)
- python (1)
- java性能分析 (1)
- spring (1)
- zookeeper (2)
- error (1)
- 算法 (1)
- hudson (1)
- svn (1)
- maven (1)
- svn server (2)
- swap linux (1)
- 协同过滤 (1)
- 邮件系统 (1)
最新评论
-
cheetah747:
我也遇到这个问题了,不过我是直接把第三方jar放到工程文件的l ...
JAVA NoClassDefFoundError: -
dxm1986:
hillfallshore 写道亲 你这是杜撰的小说吗?完全是 ...
面试有感 -
dxm1986:
mengda1027 写道从实习生到高级java到架构师,是在 ...
面试有感 -
dxm1986:
kljjack 写道一个编程十几年,每年看几十本技术书籍,技术 ...
面试有感 -
dxm1986:
轻指飞扬 写道呵呵,挺好玩的~ 我怎么感觉你招人不是很有诚意嘛 ...
面试有感
http://en.wikipedia.org/wiki/User_agent
User agent
In computing, a user agent is software (a software agent) that is acting on behalf of a user. For example, an email reader is a Mail User Agent, and in the Session Initiation Protocol (SIP), the term user agent refers to both end points of a communications session.[1]
In many cases, a user agent acts as a client in a network protocol used in communications within a client–server distributed computing system. In particular, the Hypertext Transfer Protocol identifies the client software originating the request, using a "User-Agent" header, even when the client is not operated by a user. The SIP protocol (based on HTTP) followed this usage.
Contents[hide] |
[edit] User-agent identification
When software agent operates in a network protocol, it often identifies itself, its application type, operating system, software vendor, or software revision, by submitting a characteristic identification string to its operating peer. In HTTP, SIP, and SMTP/NNTP[2] protocols, this identification is transmitted in a header field User-Agent. Bots, such as Web crawlers, often also include a URL and/or e-mail address so that the Webmaster can contact the operator of the bot.
In HTTP, the User-Agent string is often used for content negotiation, where the origin server selects suitable content or operating parameters for the response. For example, the User-Agent string might be used by a web server to choose variants based on the known capabilities of a particular version of client software.
The User-Agent string is one of the criteria by which Web crawlers may be excluded from accessing certain parts of a Web site using the Robots Exclusion Standard (robots.txt file).
[edit] Possible privacy issue
As with many other HTTP request headers, the information in the "User-Agent" string contributes to the information that the client sends to the server, since the string can vary considerably from user to user.[3]
[edit] Format
The User-Agent string format is currently specified by Section 14.43 of RFC 2616 (HTTP/1.1) The format of the User-Agent string in HTTP is a list of product tokens (keywords) with optional comments. For example if your product were called WikiBrowser, your user agent string might be WikiBrowser/1.0 Gecko/1.0. The "most important" product component is listed first. The parts of this string are as follows:
- Product name and version (WikiBrowser/1.0)
- Layout engine and version(Gecko/1.0). In this case, this indicates the Layout engine and version.
Unfortunately, during the browser wars, many web servers were configured to only send web pages that required advanced features to clients that were identified as some version of Mozilla.
For this reason, most Web browsers use a User-Agent value as follows: Mozilla/[version] ([system and browser information]) [platform] ([platform details]) [extensions]. For example, Safari on the iPad has used the following:
Mozilla/5.0 (iPad; U; CPU OS 3_2_1 like Mac OS X; en-us) AppleWebKit/531.21.10 (KHTML, like Gecko) Mobile/7B405
The components of this string are as follows:
- Mozilla/5.0: Previously used to indicate compatibility with the Mozilla rendering engine
- (iPad; U; CPU OS 3_2_1 like Mac OS X; en-us): Details of the system in which the browser is running
- AppleWebKit/531.21.10: The platform the browser uses
- (KHTML, like Gecko): Browser platform details
- Mobile/7B405: This is used by the browser to indicate specific enhancements that are available directly in the browser or through third parties. An example of this is Microsoft Live Meeting which registers an extension so that the Live Meeting service knows if the software is already installed, which means it can provide a streamlined experience to joining meetings.
[edit] User agent spoofing
The popularity of various Web browser products has varied throughout the Web's history, and this has influenced the design of Web sites in such a way that Web sites are sometimes designed to work well only with particular browsers, rather than according to uniform standards by the World Wide Web Consortium (W3C) or the Internet Engineering Task Force (IETF). Web sites often include code to detect browser version to adjust the page design sent according to the user agent string received. This may mean that less-popular browsers are not sent complex content (even though they might be able to deal with it correctly) or, in extreme cases, refused all content.[4] Thus, various browsers have a feature to cloak or spoof their identification to force certain server-side content. For example, the Android browser identifies itself as Safari in order to aid compatibility.[5]
Other HTTP client programs, like download managers and offline browsers, often have the ability to change the user agent string.
Spam bots and Web scrapers often use fake user agents.
At times it has been popular among Web developers to initiate Viewable With Any Browser campaigns,[6] encouraging developers to design Web pages that work equally well with any browser.
A result of user agent spoofing may be that collected statistics of Web browser usage are inaccurate.
[edit] User agent sniffing
The term user agent sniffing refers to the practice of Web sites showing different content when viewed with a certain user agent. On the Internet, this will result in a different site being shown when browsing the page with a specific browser. A useful example of this is Microsoft Exchange Server 2003's Outlook Web Access feature. When viewed with Internet Explorer 6 (or newer), more functionality is displayed compared to the same page in any older browsers, because older browsers could not render the same content.[citation needed] User agent sniffing is mostly considered poor practice, since it encourages browser-specific design and penalizes new browsers with unrecognized user agent identifications. Instead, the W3C recommends creating HTML markup that is standard,[7] allowing correct rendering in as many browsers as possible, and to test for specific browser features rather than particular browser versions or brands.[8]
Web sites specifically targeted towards mobile phones, like NTT DoCoMo's I-Mode or Vodafone's Vodafone Live! portals, often rely heavily on user agent sniffing, since mobile browsers often differ greatly from each other. Many developments in mobile browsing have been made in the last few years,[when?] while many older phones that do not possess these new technologies are still heavily used. Therefore, mobile Web portals will often generate completely different markup code depending on the mobile phone used to browse them. These differences can be small, e.g., resizing of certain images to fit smaller screens, or quite extensive, e.g., rendering of the page in WML instead of XHTML.
[edit] Encryption strength notations
Web browsers created in the United States, such as Netscape Navigator and Internet Explorer, use the letters U, I, and N to specify the encryption strength in the user agent string. Until 1996, when the United States government allowed encryption with keys longer than 40 bits to be exported, vendors shipped various browser versions with different encryption strengths. "U" stands for "USA" (for the version with 128-bit encryption), "I" stands for "International" — the browser has 40-bit encryption and can be used anywhere in the world — and "N" stands (de facto) for "None" (no encryption).[9] Following the lifting of export restrictions, most vendors supported 256-bit encryption.
[edit] See also
- Robots Exclusion Standard
- Web crawler
- Wireless Universal Resource File (WURFL)
- User Agent Profile (UAProf)
- Apache Mobile Filter
- Browser sniffing
[edit] References
- ^ RFC 3261, SIP: Session Initiation Protocol, IETF, The Internet Society (2002)
- ^ Netnews Article Format. IETF. November 2009. sec. 3.2.13. RFC 5536.
- ^ Peter Eckersley. "Browser Versions Carry 10.5 Bits of Identifying Information on Average", Electronic Frontier Foundation, 27 January 2010. Retrieved 25 August 2011.
- ^ Burstein complaining "... I've been rejected until I come back with Netscape"
- ^ http://androidcommunity.com/forums/f8/android-browser-reports-itself-as-apple-safari-4701/
- ^ "Viewable with Any Browser" campaign
- ^ Pemberton, Stephen. "W3C Markup Validation Service". W3C. Retrieved 2011-10-18.
- ^ Clary, Bob (10 February 2003). "Browser Detection and Cross Browser Support". Mozilla Developer Center. Mozilla. Retrieved 2009-05-30.
- ^ Zawinski, Jamie (1998-03-28). "user-agent strings (obsolete)". mozilla.org. Retrieved 2010-01-08.
发表评论
-
Nginx agent log 中 IE的浏览器版本
2012-04-19 10:13 2898http://www.useragentstring.com/ ... -
基于nginx access 的log 分析
2012-03-22 17:27 20601 设置 nginx access.log 格式 ... -
nginx 按网站用户尾号设置白名单
2011-12-27 17:48 1775nginx 按网站用户尾号设置白名单 其实这个需求很常 ... -
nginx x-forwarded-for的深度挖掘
2011-08-25 10:21 1314nginx x-forwarded-for的 ... -
nginx转发不带参数
2011-07-23 20:34 3643Nginx: rewrite重定向的参数处理问题 星期日, ... -
Nginx无需重启动态加载配置文件
2011-04-18 21:54 15316重新刷新了一下nginx的配置文件,禁止在403,404等 ... -
nginx proxy_pass location 为正则表达式的问题
2011-04-18 21:35 3665http://blog.helosa.org/2 ... -
nginx 反向代理,动静态请求分离,proxy_cache缓存及缓存清除
2011-03-18 18:04 8911今天工作之余,继续拘捣鼓了一下nginx,尝试了一下,ngin ... -
神奇的nginx
2011-03-16 15:46 1856一,设置默认图片 ...
相关推荐
还在为 user agent swicher 只有IPHONE、IE、search robot这三种烦恼吗? 导入这个列表吧,包括了目前主流的浏览器标识 使用方法 先安装好,重启火狐浏览器之后,打开菜单栏“工具”“Dafault User Agent”“Edit ...
user agent switcher是火狐手机ua模拟组件,这个包含了user agent switcher的ua列表和上万种手机UA列表,您可以自己动手书写自己先要的模拟的ua信息。user agent switcher很不错,希望能给大家带来帮助!
浏览器UA切换 UserAgent UserAgentSwitcher.xml
可用firefox导入 导入之后就可以在浏览器中切换user Agent
重启”Mozilla Firefox“,在Mozilla Firefox顶部的菜单上按右键,选“定制(C)..."->找到一个黑白的地球图标下面写着"User Agent"->把它拖拽到Mozilla Firefox顶部的菜单上->"完成" [网络传输]手机+蓝牙+CMWAP...
useragentswicher 更新至2014-02-15日为止... 导入这个列表吧,包括了目前主流的浏览器标识 使用方法 先安装好,重启火狐浏览器之后,打开菜单栏“工具”“Dafault User Agent”“Edit User Agents”“Import…”导入
Android等等做测试,就可以试试user agent,这套 Chrome浏览器的扩展程序,能将Chrome伪装成各大家不同的浏览器,让你方便测试初始网页。user agent扩展可以轻松,快捷地修改Chrome浏览器的UA。 支持自动切换模式,...
User Agent简介及在WAP网站开发中的应用,陈全宝,,随着移动通信技术日新月异的发展,越来越多的人开始使用移动设备获取数据服务,以WAP技术为代表的移动数据业务获得广泛的应用,手
如果对这个默认样式不满意最简单的解决办法就是重新设置该样式的属性,因为user agent stylesheet优先级很低,会被覆盖,这样就不会影响到我们的样式了,比如这里我就讲form 的margin-bottom设为0px。 User Agent ...
北航iAuth2.0系统python客户端,包含WSC(Web Site Client)和UAC(User Agent Client)的实现,我用它来从ihome收消息。。。 iauth is a protocal which allows third part APPs to acess user data on a Resource...
CPALEAD自动填表工具 支持 user agent伪造
ua大全电脑10000个电脑端User Agent(UA库) 示例: mozilla/5.0 (windows; u; windows nt 5.2; en-us) applewebkit/532.9 (khtml, like gecko) chrome/5.0.310.0 safari/532.9 mozilla/5.0 (windows; u; windows nt...
User Agent中文名为用户代理,简称 UA,它是一个特殊字符串头,使得服务器能够识别客户使用的操作系统及版本、CPU 类型、浏览器及版本、浏览器渲染引擎、浏览器语言、浏览器插件等。一些网站常常通过判断 UA 来给...
Java User-Agent 解析库
User-Agent Switcher for Chrome 汉化版,适合于各类页面用不同的UA查看。 UA文件包括移动端和PC端的多种设备
freeswitch配置更改user-agent.txt
a sip user agent for windows
在进行微信公众账号开发的时候,需要知道当前的浏览器是微信内置的浏览器,那么如何判断呢?这是就只有通过浏览器的User Agent来进行判断了
最新添加User-Agent(去重共46479条),手机UA库,最新手机UA库,需要的朋友可以下载,资源来自网络.