developer.mozilla.org Open in urlscan Pro
2600:1901:0:ab4c::  Public Scan

URL: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/User-Agent
Submission: On September 22 via api from US — Scanned from DE

Form analysis 1 forms found in the DOM

/en-US/search

<form action="/en-US/search" class="search-form search-widget" id="top-nav-search-form" role="search"><label id="top-nav-search-label" for="top-nav-search-input" class="visually-hidden">Search MDN</label><input aria-activedescendant=""
    aria-autocomplete="list" aria-controls="top-nav-search-menu" aria-expanded="false" aria-labelledby="top-nav-search-label" autocomplete="off" id="top-nav-search-input" role="combobox" type="search" class="search-input-field" name="q"
    placeholder="   " required="" value=""><button type="button" class="button action has-icon clear-search-button"><span class="button-wrap"><span class="icon icon-cancel "></span><span class="visually-hidden">Clear search
        input</span></span></button><button type="submit" class="button action has-icon search-button"><span class="button-wrap"><span class="icon icon-search "></span><span class="visually-hidden">Search</span></span></button>
  <div id="top-nav-search-menu" role="listbox" aria-labelledby="top-nav-search-label"></div>
</form>

Text Content

 * Skip to main content
 * Skip to search
 * Skip to select language

See what your team could do with The DevSecOps Platform. Take GitLab for a
spin.30 day free trialMozilla ads

Don't want to see ads?
MDN Web DocsOpen main menu
 * ReferencesReferences
   * Overview / Web Technology
     
     Web technology reference for developers
   
   * HTML
     
     Structure of content on the web
   
   * CSS
     
     Code used to describe document style
   
   * JavaScript
     
     General-purpose scripting language
   
   * HTTP
     
     Protocol for transmitting web resources
   
   * Web APIs
     
     Interfaces for building web applications
   
   * Web Extensions
     
     Developing extensions for web browsers
   
   * Web Technology
     
     Web technology reference for developers
 * GuidesGuides
   * Overview / MDN Learning Area
     
     Learn web development
   
   * MDN Learning Area
     
     Learn web development
   
   * HTML
     
     Learn to structure web content with HTML
   
   * CSS
     
     Learn to style content using CSS
   
   * JavaScript
     
     Learn to run scripts in the browser
   
   * Accessibility
     
     Learn to make the web accessible to all
 * PlusPlus
   * Overview
     
     A customized MDN experience
   
   * AI Help
     
     Get real-time assistance and support
   
   * Updates
     
     All browser compatibility updates at a glance
   
   * Documentation
     
     Learn how to use MDN Plus
   
   * FAQ
     
     Frequently asked questions about MDN Plus
 * Curriculum
 * Blog
 * Tools
   * Playground
     
     Write, test and share your code
   
   * HTTP Observatory
     
     Scan a website for free
   
   * AI Help
     
     Get real-time assistance and support

Search MDNClear search inputSearch

Theme
 * Log in
 * Sign up for free

 1. References
 2. HTTP
 3. Headers
 4. User-Agent

Article Actions
 * English (US)
    * Español
    * 日本語
    * 한국어
    * Português (do Brasil)
    * Русский
    * 中文 (简体)
    * 正體中文 (繁體)

Filter sidebarClear filter input


IN THIS ARTICLE

 * Syntax
 * Firefox UA string
 * Chrome UA string
 * Opera UA string
 * Microsoft Edge UA string
 * Safari UA string
 * Crawler and bot UA strings
 * Library and net tool UA strings
 * Specifications
 * Browser compatibility
 * See also

 1.  HTTP
 2.  Guides
 3.  Resources and URIs
      1. Identifying resources on the Web
      2. Data URLs
      3. Introduction to MIME types
      4. Common MIME types
      5. Choosing between www and non-www URLs

 4.  HTTP guide
      1. Basics of HTTP
      2. Overview of HTTP
      3. Evolution of HTTP
      4. HTTP Messages
      5. A typical HTTP session
      6. Connection management in HTTP/1.x
      7. Protocol upgrade mechanism

 5.  HTTP security
      1. Content Security Policy (CSP)
      2. HTTP Strict Transport Security (HSTS)
      3. X-Content-Type-Options
      4. X-Frame-Options
      5. X-XSS-Protection
      6. Practical security implementation guides
      7. HTTP Observatory

 6.  HTTP access control (CORS)
 7.  HTTP authentication
 8.  HTTP caching
 9.  HTTP compression
 10. HTTP conditional requests
 11. HTTP content negotiation
 12. HTTP cookies
 13. HTTP range requests
 14. HTTP redirects
 15. HTTP specifications
 16. Permissions Policy
 17. References
 18. HTTP headers
      1.   Accept
      2.   Accept-CH
      3.   Accept-Charset
      4.   Accept-Encoding
      5.   Accept-Language
      6.   Accept-Patch
      7.   Accept-Post
      8.   Accept-Ranges
      9.   Access-Control-Allow-Credentials
      10.  Access-Control-Allow-Headers
      11.  Access-Control-Allow-Methods
      12.  Access-Control-Allow-Origin
      13.  Access-Control-Expose-Headers
      14.  Access-Control-Max-Age
      15.  Access-Control-Request-Headers
      16.  Access-Control-Request-Method
      17.  Age
      18.  Allow
      19.  Alt-Svc
      20.  Alt-Used
      21.  Attribution-Reporting-Eligible Experimental
      22.  Attribution-Reporting-Register-Source Experimental
      23.  Attribution-Reporting-Register-Trigger Experimental
      24.  Authorization
      25.  Cache-Control
      26.  Clear-Site-Data
      27.  Connection
      28.  Content-Digest Experimental
      29.  Content-Disposition
      30.  Content-DPR Non-standard Deprecated
      31.  Content-Encoding
      32.  Content-Language
      33.  Content-Length
      34.  Content-Location
      35.  Content-Range
      36.  Content-Security-Policy
      37.  Content-Security-Policy-Report-Only
      38.  Content-Type
      39.  Cookie
      40.  Critical-CH Experimental
      41.  Cross-Origin-Embedder-Policy
      42.  Cross-Origin-Opener-Policy
      43.  Cross-Origin-Resource-Policy
      44.  Date
      45.  Device-Memory
      46.  Digest Non-standard Deprecated
      47.  DNT Non-standard Deprecated
      48.  Downlink Experimental
      49.  DPR Non-standard Deprecated
      50.  Early-Data Experimental
      51.  ECT Experimental
      52.  ETag
      53.  Expect
      54.  Expect-CT Deprecated
      55.  Expires
      56.  Forwarded
      57.  From
      58.  Host
      59.  If-Match
      60.  If-Modified-Since
      61.  If-None-Match
      62.  If-Range
      63.  If-Unmodified-Since
      64.  Keep-Alive
      65.  Last-Modified
      66.  Link
      67.  Location
      68.  Max-Forwards
      69.  NEL Experimental
      70.  No-Vary-Search Experimental
      71.  Observe-Browsing-Topics Experimental Non-standard
      72.  Origin
      73.  Origin-Agent-Cluster Experimental
      74.  Permissions-Policy
      75.  Pragma Deprecated
      76.  Priority
      77.  Proxy-Authenticate
      78.  Proxy-Authorization
      79.  Range
      80.  Referer
      81.  Referrer-Policy
      82.  Refresh
      83.  Report-To Non-standard Deprecated
      84.  Reporting-Endpoints Experimental
      85.  Repr-Digest Experimental
      86.  Retry-After
      87.  RTT Experimental
      88.  Save-Data Experimental
      89.  Sec-Browsing-Topics Experimental Non-standard
      90.  Sec-CH-Prefers-Color-Scheme Experimental
      91.  Sec-CH-Prefers-Reduced-Motion Experimental
      92.  Sec-CH-Prefers-Reduced-Transparency Experimental
      93.  Sec-CH-UA Experimental
      94.  Sec-CH-UA-Arch Experimental
      95.  Sec-CH-UA-Bitness Experimental
      96.  Sec-CH-UA-Full-Version Deprecated
      97.  Sec-CH-UA-Full-Version-List Experimental
      98.  Sec-CH-UA-Mobile Experimental
      99.  Sec-CH-UA-Model Experimental
      100. Sec-CH-UA-Platform Experimental
      101. Sec-CH-UA-Platform-Version Experimental
      102. Sec-Fetch-Dest
      103. Sec-Fetch-Mode
      104. Sec-Fetch-Site
      105. Sec-Fetch-User
      106. Sec-GPC Experimental Non-standard
      107. Sec-Purpose
      108. Sec-WebSocket-Accept
      109. Sec-WebSocket-Extensions
      110. Sec-WebSocket-Key
      111. Sec-WebSocket-Protocol
      112. Sec-WebSocket-Version
      113. Server
      114. Server-Timing
      115. Service-Worker-Navigation-Preload
      116. Set-Cookie
      117. Set-Login Experimental
      118. SourceMap
      119. Speculation-Rules Experimental
      120. Strict-Transport-Security
      121. Supports-Loading-Mode Experimental
      122. TE
      123. Timing-Allow-Origin
      124. Tk Non-standard Deprecated
      125. Trailer
      126. Transfer-Encoding
      127. Upgrade
      128. Upgrade-Insecure-Requests
      129. User-Agent
      130. Vary
      131. Via
      132. Viewport-Width Non-standard Deprecated
      133. Want-Content-Digest Experimental
      134. Want-Digest Non-standard Deprecated
      135. Want-Repr-Digest Experimental
      136. Warning Deprecated
      137. Width Non-standard Deprecated
      138. WWW-Authenticate
      139. X-Content-Type-Options
      140. X-DNS-Prefetch-Control Non-standard
      141. X-Forwarded-For Non-standard
      142. X-Forwarded-Host Non-standard
      143. X-Forwarded-Proto Non-standard
      144. X-Frame-Options
      145. X-XSS-Protection Non-standard

 19. HTTP request methods
      1. CONNECT
      2. DELETE
      3. GET
      4. HEAD
      5. OPTIONS
      6. PATCH
      7. POST
      8. PUT
      9. TRACE

 20. HTTP response status codes
      1.  100 Continue
      2.  101 Switching Protocols
      3.  102 Processing
      4.  103 Early Hints
      5.  200 OK
      6.  201 Created
      7.  202 Accepted
      8.  203 Non-Authoritative Information
      9.  204 No Content
      10. 205 Reset Content
      11. 206 Partial Content
      12. 207 Multi-Status
      13. 208 Already Reported
      14. 226 IM Used
      15. 300 Multiple Choices
      16. 301 Moved Permanently
      17. 302 Found
      18. 303 See Other
      19. 304 Not Modified
      20. 307 Temporary Redirect
      21. 308 Permanent Redirect
      22. 400 Bad Request
      23. 401 Unauthorized
      24. 402 Payment Required
      25. 403 Forbidden
      26. 404 Not Found
      27. 405 Method Not Allowed
      28. 406 Not Acceptable
      29. 407 Proxy Authentication Required
      30. 408 Request Timeout
      31. 409 Conflict
      32. 410 Gone
      33. 411 Length Required
      34. 412 Precondition Failed
      35. 413 Content Too Large
      36. 414 URI Too Long
      37. 415 Unsupported Media Type
      38. 416 Range Not Satisfiable
      39. 417 Expectation Failed
      40. 418 I'm a teapot
      41. 421 Misdirected Request
      42. 422 Unprocessable Content
      43. 423 Locked
      44. 424 Failed Dependency
      45. 425 Too Early
      46. 426 Upgrade Required
      47. 428 Precondition Required
      48. 429 Too Many Requests
      49. 431 Request Header Fields Too Large
      50. 451 Unavailable For Legal Reasons
      51. 500 Internal Server Error
      52. 501 Not Implemented
      53. 502 Bad Gateway
      54. 503 Service Unavailable
      55. 504 Gateway Timeout
      56. 505 HTTP Version Not Supported
      57. 506 Variant Also Negotiates
      58. 507 Insufficient Storage
      59. 508 Loop Detected
      60. 510 Not Extended
      61. 511 Network Authentication Required

 21. CSP directives
      1.  CSP source values
      2.  CSP: base-uri
      3.  CSP: block-all-mixed-content Deprecated
      4.  CSP: child-src
      5.  CSP: connect-src
      6.  CSP: default-src
      7.  CSP: fenced-frame-src Experimental
      8.  CSP: font-src
      9.  CSP: form-action
      10. CSP: frame-ancestors
      11. CSP: frame-src
      12. CSP: img-src
      13. CSP: manifest-src
      14. CSP: media-src
      15. CSP: object-src
      16. CSP: prefetch-src Non-standard Deprecated
      17. CSP: report-to
      18. CSP: report-uri Deprecated
      19. CSP: require-trusted-types-for Experimental
      20. CSP: sandbox
      21. CSP: script-src
      22. CSP: script-src-attr
      23. CSP: script-src-elem
      24. CSP: style-src
      25. CSP: style-src-attr
      26. CSP: style-src-elem
      27. CSP: trusted-types Experimental
      28. CSP: upgrade-insecure-requests
      29. CSP: worker-src

 22. CORS errors
      1.  Reason: CORS disabled
      2.  Reason: CORS header 'Access-Control-Allow-Origin' does not match 'xyz'
      3.  Reason: CORS header 'Access-Control-Allow-Origin' missing
      4.  Reason: CORS header 'Origin' cannot be added
      5.  Reason: CORS preflight channel did not succeed
      6.  Reason: CORS request did not succeed
      7.  Reason: CORS request external redirect not allowed
      8.  Reason: CORS request not HTTP
      9.  Reason: Credential is not supported if the CORS header
          'Access-Control-Allow-Origin' is '*'
      10. Reason: Did not find method in CORS header
          'Access-Control-Allow-Methods'
      11. Reason: expected 'true' in CORS header
          'Access-Control-Allow-Credentials'
      12. Reason: invalid token 'xyz' in CORS header
          'Access-Control-Allow-Headers'
      13. Reason: invalid token 'xyz' in CORS header
          'Access-Control-Allow-Methods'
      14. Reason: missing token 'xyz' in CORS header
          'Access-Control-Allow-Headers' from CORS preflight channel
      15. Reason: Multiple CORS header 'Access-Control-Allow-Origin' not allowed

 23. Permissions-Policy directives
      1.  Permissions-Policy: accelerometer Experimental
      2.  Permissions-Policy: ambient-light-sensor Experimental
      3.  Permissions-Policy: attribution-reporting Experimental
      4.  Permissions-Policy: autoplay Experimental
      5.  Permissions-Policy: bluetooth Experimental
      6.  Permissions-Policy: browsing-topics Experimental Non-standard
      7.  Permissions-Policy: camera
      8.  Permissions-Policy: compute-pressure Experimental
      9.  Permissions-Policy: display-capture
      10. Permissions-Policy: document-domain Experimental
      11. Permissions-Policy: encrypted-media Experimental
      12. Permissions-Policy: fullscreen
      13. Permissions-Policy: gamepad Experimental
      14. Permissions-Policy: geolocation
      15. Permissions-Policy: gyroscope Experimental
      16. Permissions-Policy: hid Experimental
      17. Permissions-Policy: identity-credentials-get Experimental
      18. Permissions-Policy: idle-detection Experimental
      19. Permissions-Policy: local-fonts Experimental
      20. Permissions-Policy: magnetometer Experimental
      21. Permissions-Policy: microphone
      22. Permissions-Policy: midi Experimental
      23. Permissions-Policy: otp-credentials Experimental
      24. Permissions-Policy: payment Experimental
      25. Permissions-Policy: picture-in-picture Experimental
      26. Permissions-Policy: publickey-credentials-create Experimental
      27. Permissions-Policy: publickey-credentials-get
      28. Permissions-Policy: screen-wake-lock
      29. Permissions-Policy: serial Experimental
      30. Permissions-Policy: speaker-selection Experimental
      31. Permissions-Policy: storage-access Experimental
      32. Permissions-Policy: usb Experimental
      33. Permissions-Policy: web-share
      34. Permissions-Policy: window-management Experimental
      35. Permissions-Policy: xr-spatial-tracking Experimental

Learn web development with MDNLimited time offer: get 30% discount on the
frontend developer course we developed with ScrimbaSign up now
Ad
Don't want to see ads?


IN THIS ARTICLE

 * Syntax
 * Firefox UA string
 * Chrome UA string
 * Opera UA string
 * Microsoft Edge UA string
 * Safari UA string
 * Crawler and bot UA strings
 * Library and net tool UA strings
 * Specifications
 * Browser compatibility
 * See also

Learn web development with MDNLimited time offer: get 30% discount on the
frontend developer course we developed with ScrimbaSign up now
Ad
Don't want to see ads?


USER-AGENT

The User-Agent request header is a characteristic string that lets servers and
network peers identify the application, operating system, vendor, and/or version
of the requesting user agent.

Warning: Please read Browser detection using the user agent for why serving
different Web pages or services to different browsers is usually a bad idea.

Header type Request header Forbidden header name no


SYNTAX

httpCopy to Clipboard

User-Agent: <product> / <product-version> <comment>


Common format for web browsers:

httpCopy to Clipboard

User-Agent: Mozilla/5.0 (<system-information>) <platform> (<platform-details>) <extensions>



DIRECTIVES

<product>

A product identifier — its name or development codename.

<product-version>

Version number of the product.

<comment>

Zero or more comments containing more details. For example, sub-product
information.


FIREFOX UA STRING

For 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


 1. Mozilla/5.0 is the general token that says that the browser is
    Mozilla-compatible. For historical reasons, almost every browser today sends
    it.
 2. 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.
 3. rv:geckoversion indicates the release version of Gecko (such as "17.0"). In
    recent browsers, geckoversion is the same as firefoxversion.
 4. Gecko/geckotrail indicates that the browser is based on Gecko. (On the
    desktop, geckotrail is always the fixed string 20100101.)
 5. Firefox/firefoxversion indicates that the browser is Firefox and provides
    the version (such as "17.0").


EXAMPLES

Mozilla/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 STRING

The 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.


EXAMPLES

Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36



OPERA UA STRING

The 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/<version>".


EXAMPLES

Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.106 Safari/537.36 OPR/38.0.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 STRING

The Edge browser is also based on the Blink engine. It adds "Edg/<version>".


EXAMPLES

Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36 Edg/91.0.864.59



SAFARI UA STRING

In this example, the user agent string is mobile Safari's version. It contains
the word "Mobile".


EXAMPLES

Mozilla/5.0 (iPhone; CPU iPhone OS 13_5_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.1.1 Mobile/15E148 Safari/604.1



CRAWLER AND BOT UA STRINGS




EXAMPLES

Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)


Mozilla/5.0 (compatible; YandexAccessibilityBot/3.0; +http://yandex.com/bots)



LIBRARY AND NET TOOL UA STRINGS




EXAMPLES

curl/7.64.1


PostmanRuntime/7.26.5



SPECIFICATIONS

SpecificationHTTP Semantics
# field.user-agent


BROWSER COMPATIBILITY

Report problems with this compatibility data on GitHub

desktopmobile
Chrome

Edge

Firefox

Opera

Safari

Chrome Android

Firefox for Android

Opera Android

Safari on iOS

Samsung Internet

WebView Android

WebView on iOS

User-Agent
Full support
Chrome1
Toggle history
Full support
Edge12
Toggle history
Full support
Firefox1
Toggle history
Full support
Opera15
Toggle history
Full support
Safari1
Toggle history
Full support
Chrome Android18
Toggle history
Full support
Firefox for Android4
Toggle history
Full support
Opera Android14
Toggle history
Full support
Safari on iOS1
Toggle history
Full support
Samsung Internet1.0
Toggle history
Full support
WebView Android4.4
Toggle history
Full support
WebView on iOS1
Toggle history


LEGEND

Tip: you can click/tap on a cell for more information.

Full supportFull support
The compatibility table on this page is generated from structured data. If you'd
like to contribute to the data, please check out
https://github.com/mdn/browser-compat-data and send us a pull request.


SEE ALSO

 * User-Agent detection, history and checklist
 * Firefox user agent string reference
 * Browser detection using the user agent
 * Client hints


HELP IMPROVE MDN

Was this page helpful to you?
YesNo
Learn how to contribute.

This page was last modified on Jul 25, 2024 by MDN contributors.

View this page on GitHub • Report a problem with this content
Mozilla adsDon't want to see ads?
MDN logo

Your blueprint for a better internet.

 * MDN on Mastodon
 * MDN on X (formerly Twitter)
 * MDN on GitHub
 * MDN Blog RSS Feed


MDN

 * About
 * Blog
 * Careers
 * Advertise with us


SUPPORT

 * Product help
 * Report an issue


OUR COMMUNITIES

 * MDN Community
 * MDN Forum
 * MDN Chat


DEVELOPERS

 * Web Technologies
 * Learn Web Development
 * MDN Plus
 * Hacks Blog

Mozilla logo
 * Website Privacy Notice
 * Cookies
 * Legal
 * Community Participation Guidelines

Visit Mozilla Corporation’s not-for-profit parent, the Mozilla Foundation.
Portions of this content are ©1998–2024 by individual mozilla.org contributors.
Content available under a Creative Commons license.