I sometimes see one or the other in my server logs.
The HTTP headers beginning with X
are officious headers. They are not specified in the HTTP specification, but just coined by some 3rd party as kind of vendor-specific or "de facto" standard and taken over by many others, like HTTP X-Forwarded-For
in case of proxy servers.
The particular HTTP X-User-Agent
header is often inserted by some independent messenger between the actual client and the server, like a proxy, loadbalancer, transcoder, etc, but also some XMLHttpRequest based libraries. It often identifies the messenger itself. The User-Agent
header should still represent the actual client. You also see this header sometimes in emails, this then represents the email program/software responsible for sending the mail.
That it is called HTTP_X_USER_AGENT
(uppercased, HTTP
prefix, underscores instead of hyphens) is PHP specific.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With