User agent

From MozillaWiki
Revision as of 21:16, 10 July 2024 by Tantek (talk | contribs) (dfn, AKA UA, replace incomplete dev guidance with a link to MDN instead for broader (and more up to date) guidance, mv FxOS to History, link to MDN user-agent for HTTP)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

The user agent string (AKA UA string) is a string which is visible in the HTTP headers of an HTTP client and in the navigator.userAgent object JavaScript for JS enabled client.

For developer guidance about how to use the user agent string, see:

HTTP

See: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/User-Agent

Browsers with JavaScript

var ua = navigator.userAgent;

History

  • on Firefox OS devices:
User-Agent: Mozilla/5.0 (Mobile; rv:18.0) Gecko/18.0 Firefox/18.0

See Also