HTTP: What is a user agent?
30 October 2022 (Updated 30 October 2022)
On this page
In a nutshell
An HTTP user agent is any client program that initiates a request. Examples include:
- Web browsers (e.g., Chrome or Firefox)
- Crawlers/spiders that traverse the web to build things like search indexes.
- Command-line tools like
curl
orwget
- Mobile apps
- IoT devices (e.g., a fridge or a light bulb).
Example
Run curl example.com -v
from your terminal and you should see the a User-Agent
request header:
> User-Agent: curl/7.79.1
If you visit example.com from Chrome, you can also see the User-Agent
header set:
Tagged:
HTTP
Thanks for your comment 🙏. Once it's approved, it will appear here.
Leave a comment