Enable user-agent modification

I'm writing a ddns javascript widget. It's working, but my ddns provider prefers that a custom user-agent header is sent with the http request. At present, changing this is denied by the browser. Could it be enabled, please?