Re: [whatwg] Controlling the User-Agent header from script

From: whatwg [mailto:whatwg-bounces@lists.whatwg.org] On Behalf Of Roger Hågensen

> Also, a script being able to set a custom XMLHttpRequest User-Agent would be nice.
> Not necessarily replace the whole thing but maybe concatenate to the end of the browser one?
> That way a webmaster would be able to see that the request is from script Blah v0.9 when it really should be Blah v1.0 for example.
> I always make sure that any Software I make uses a custom User-Agent, same goes for any PHP scripts and so on, ditto if I use CURL, that way the logs on the server will provide some insight.

If this is your use case, a custom header will work just fine.

Received on Monday, 13 October 2014 23:21:00 UTC