DELAPARRA
Index
Color
NL
Category: HTTP headers

User-Agent

Explained by Updated

What is User-Agent?

User-Agent: String identifying the client software. Browsers, libraries, bots all send one. The User-Agent header identifies the software making a request: a browser with its version and operating system, a command-line tool like curl, an HTTP library, or a search engine crawler. Servers use it for statistics, to serve different content to some clients, and to recognise bots. It is also easy to fake, so never use it for security decisions.

Definition source Coders Lingo, CC BY 4.0

Frequently asked questions about User-Agent

What should you keep in mind with User-Agent?

When your own code calls external APIs, set a clear user agent with your application's name and a contact URL. API providers can then reach you if something goes wrong, instead of simply blocking unknown traffic. Feature detection is a more reliable way than user-agent sniffing to decide what a browser supports, because browsers change their user-agent strings regularly and some reduce the detail they share.

What does an example of User-Agent look like?

User-Agent: Mozilla/5.0 (...) Chrome/120 Safari/537.36

At a glance

CategoryHTTP headers
Explained by
Updated

More HTTP headers terms

All terms starting with U

Skills

Download all skills (zip)

Manuals

Related services

Need any help?

Stuck on one of these in your own project? Tell me what you are working on and I will tell you how I would approach it.