Request negotiation · Request header
User-Agent
The client software identifying itself.
What is User-Agent?
The User-Agent string names the browser, engine, OS, and often the device. It is famously convoluted for historical reasons.
Typical usage
Set automatically by browsers and HTTP libraries. Read for analytics and rare compatibility branching.
Examples
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36Common gotchas
User-Agent can be trivially spoofed and is being reduced by modern browsers. Do not use it as a security control.