W3C home > Mailing lists > Public > whatwg@whatwg.org > October 2014

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

From: Domenic Denicola <domenic@domenicdenicola.com>
Date: Mon, 13 Oct 2014 23:20:34 +0000
To: "rescator@emsai.net" <rescator@emsai.net>, "whatwg@lists.whatwg.org" <whatwg@lists.whatwg.org>
Message-ID: <762929fb0abf41dba31a3f3ecc3ffc9d@BY1PR0501MB1477.namprd05.prod.outlook.com>
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

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 17:00:24 UTC