What is all the browser agent stuff?

天大地大妈咪最大 提交于 2019-12-02 03:55:36

I think this website will be very helpful to you: http://www.useragentstring.com/pages/useragentstring.php

You can copy and paste user agents into this index page and have it do a simple analysis. http://www.useragentstring.com/index.php

A user agent is used to identify the application that accessed a specific web site or service.

The common pattern:

Mozilla/[version] ([system and browser information]) [platform] ([platform details]) [extensions]

Source for this information: Wikipedia

Since the user agent is exposed by a commonly accessible string, this can be modified easily (aka spoofed) - a method that can be easily done in .NET by directly modifying the UserAgent property - that way you can, for example, identify your download manager as Internet Explorer while it doesn't have anything to do with it. Not saying it's a good practice since it messes with visit stats, but you need this from time to time - for example, to access a web stream from a website that is only accessible through an app and not through a web browser. All you need is to know the user agent for that app and then pass it inside your own application.

A pretty decent source of information for your case would be MSDN. In case you are wondering why IE is sometimes identified as Mozilla, here is what Microsoft has to say in their official docs:

For historical reasons, Internet Explorer identifies itself as a Mozilla 4.0 browser.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!