User-Agent – HTTP – MDN Web Docs

SyntaxUser-Agent: /
Common format for web browsers:
User-Agent: Mozilla/5. 0 () ()
Directives A product identifier — its name or development codename. Version number of the product.

Zero or more comments containing more details. For example, sub-product information.
Firefox UA stringFor more on Firefox- and Gecko-based user agent strings, see the Firefox user agent string reference. The UA string of Firefox is broken down into 4 components:
Mozilla/5. 0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion
Mozilla/5. 0 is the general token that says that the browser is Mozilla-compatible. For historical reasons, almost every browser today sends it.
platform describes the native platform that the browser is running on (Windows, Mac, Linux, Android, etc. ) and if it is a mobile phone. Firefox OS phones say Mobile — the web is the platform. Note that platform can consist of multiple “;”-separated tokens. See below for further details and examples.
rv:geckoversion indicates the release version of Gecko (such as “17. 0”). In recent browsers, geckoversion is the same as firefoxversion.
Gecko/geckotrail indicates that the browser is based on Gecko. (On the desktop, geckotrail is always the fixed string 20100101. )
Firefox/firefoxversion indicates that the browser is Firefox and provides the version (such as “17. 0”).
ExamplesMozilla/5. 0 (Windows NT 6. 1; Win64; x64; rv:47. 0) Gecko/20100101 Firefox/47. 0
Mozilla/5. 0 (Macintosh; Intel Mac OS X x. y; rv:42. 0) Gecko/20100101 Firefox/42. 0
Chrome UA stringThe Chrome (or Chromium/Blink-based engines) user agent string is similar to Firefox’s. For compatibility, it adds strings like KHTML, like Gecko and Safari. ExamplesMozilla/5. 0 (X11; Linux x86_64) AppleWebKit/537. 36 (KHTML, like Gecko) Chrome/51. 0. 2704. 103 Safari/537. 36
Opera UA stringThe Opera browser is also based on the Blink engine, which is why it almost looks the same as the Chrome UA string, but adds “OPR/“. 106 Safari/537. 36 OPR/38. 2220. 41
Older, Presto-based Opera releases used:
Opera/9. 80 (Macintosh; Intel Mac OS X; U; en) Presto/2. 2. 15 Version/10. 00
Opera/9. 60 (Windows NT 6. 0; U; en) Presto/2. 1. 1
Microsoft Edge UA stringThe Edge browser is also based on the Blink engine. It adds “Edg/“. 0 (Windows NT 10. 0; Win64; x64) AppleWebKit/537. 36 (KHTML, like Gecko) Chrome/91. 4472. 124 Safari/537. 36 Edg/91. 864. 59
Safari UA stringIn this example, the user agent string is mobile Safari’s version. It contains the word “Mobile”. 0 (iPhone; CPU iPhone OS 13_5_1 like Mac OS X) AppleWebKit/605. 15 (KHTML, like Gecko) Version/13. 1 Mobile/15E148 Safari/604. 1
Internet Explorer UA stringExamplesMozilla/5. 0 (compatible; MSIE 9. 0; Windows Phone OS 7. 5; Trident/5. 0; IEMobile/9. 0)
Crawler and bot UA stringsExamplesMozilla/5. 0 (compatible; Googlebot/2. 1; +)
Mozilla/5. 0 (compatible; YandexAccessibilityBot/3. 0; +)
Examplescurl/7. 64. 1
PostmanRuntime/7. 26. 5
SpecificationsSpecificationHypertext Transfer Protocol (HTTP/1. 1): Semantics and Content (HTTP/1. 1)# compatibilityBCD tables only load in the browserSee also
User-Agent detection, history and checklist
Firefox user agent string reference
Browser detection using the user agent
Navigator.userAgent - Web APIs | MDN

Navigator.userAgent – Web APIs | MDN

The erAgent read-only property returns the
user agent string for the current browser.
Note: The specification asks browsers to provide as little information via this field as
possible. Never assume that the value of this property will stay the same in future
versions of the same browser. Try not to use it at all, or only for current and past
versions of a browser. New browsers may start using the same UA, or part of it, as an
older browser: you really have no guarantee that the browser agent is indeed the one
advertised by this property.
Also keep in mind that users of a browser can change the value of this field if they
want (UA spoofing).
Browser identification based on detecting the user agent string is
unreliable and is not recommended, as the user agent
string is user configurable. For example:
In Firefox, you can change the preference eragent. override in
about:config. Some Firefox extensions do that; however, this only changes
the HTTP header that gets sent, and doesn’t affect browser detection performed by
JavaScript code.
Opera 6+ allows users to set the browser identification string via a menu.
Microsoft Internet Explorer uses the Windows registry.
Safari and iCab allow users to change the browser user agent string to predefined
Internet Explorer or Netscape strings via a menu.
Syntaxvar ua = erAgent;
A DOMString specifying the complete user agent string the browser
provides both in HTTP headers and in response to this and other related
methods on the Navigator object.
The user agent string is built on a formal structure which can be decomposed into
several pieces of info. Each of these pieces of info comes from other navigator
properties which are also settable by the user. Gecko-based browsers comply with the
following general structure:
userAgent = appCodeName/appVersion number (Platform; Security; OS-or-CPU;
Localization; rv: revision-version-number) product/productSub
Application-Name Application-Name-version
// alerts “Mozilla/5. 0 (Windows; U; Win98; en-US; rv:0. 9. 2) Gecko/20010725 Netscape6/6. 1”
SpecificationsSpecificationHTML Standard (HTML)# dom-navigator-useragent-devBrowser compatibilityBCD tables only load in the browserSee also
User-Agent HTTP header
What is my user agent? -

What is my user agent? –

Your User Agent is:
This page shows you what your web browser is sending in the “User-Agent” header for your HTTP requests. Want to know what headers your browser is sending?
What does all of that mean?!
Each bit of your user agent indicates something particular about your system.
There’s no “standard” way of writing a user agent string, so different web browsers use different formats (some are wildly different), and many web browsers cram loads of information into their user agents. That’s where steps in – we decode your user agent string to figure out everything it’s saying.
Check out our user agent analyser page, which gives you a neat breakdown of all the things we can tell you about your browser and computer based on your user agent. We have a User Agent API if you need to use the detection in your own system too.
Can I change my user agent?
It is possible to change or “fake” what your web browser sends as its user agent. Some mobile web browsers will let you change what the browser identifies itself as (ie “Mobile Mode” or “Desktop Mode”) in order to access certain websites that only allow desktop computers. If you change this setting, the user agent is what is affected.
What are some other user agent strings?
If you’d like to see lots of other user agents that this site has been sent, check out our User Agents page.
More questions?
If you have any more questions, use the contact form and we’ll answer it and add your question here.
How to enable JavaScript
Change your JavaScript settings
Read more
How to enable Cookies
Configure your cookie settings for the best privacy
Update your browser
Get more features and better security.
I can’t log in to a website.
We’ve got a detailed guide to help you solve login problems
Why do websites use cookies?
Why are cookies useful? Do you need them?
How to update your browser
Old software puts you at risk.
Clear Cache, Cookies and History
How to reset your browsing history
Try a different web browser
Different web browsers have different features – try a different one to see if you prefer it.
Use a VPN to hide your IP address
We recommend NordVPN to hide your IP address or to unblock websites.
Read more

Frequently Asked Questions about useragent

What is userAgent in request?

The HTTP headers User-Agent is a request header that allows a characteristic string that allows network protocol peers to identify the Operating System and Browser of the web-server. Your browser sends the user agent to every website you connect to. … The data of the header field varies from browser to browser.Oct 11, 2019

Which is the best user agent?

Slurp Bot. … DuckDuckBot. … Baiduspider. … Yandex Bot. … Sogou Spider. … Exabot. … 9. Facebook external hit. Facebook allows its users to send links to interesting web content to other Facebook users. … Alexa crawler. ia_archiver is the web crawler for Amazon’s Alexa internet rankings.More items…•Jun 6, 2017

How do I find my browser user agent?

The user-agent string of the browser is accessed using the navigator. userAgent property and then stored in a variable. The presence of the strings of a browser in this user-agent string is detected one by one. Detecting the Chrome browser: The user-agent of the Chrome browser is “Chrome”.Nov 15, 2019

Leave a Reply

Your email address will not be published. Required fields are marked *