How can I trick a user agent into a GET JavaScript request?

How can I trick a user agent into a GET JavaScript request? setRequestHeader with User-Agentnot allowed:

xmlHttpRequest.setRequestHeader("User-Agent", "...");
+5
source share
2 answers

You cannot do this in a semi-decent browser due to security issues associated with it. You do not want XSS scripts to change request headers and work on your site.

However, I believe that IE uses a workaround if you use VBScript :

MyHttp.setRequestHeader "User-Agent", "MyCustomUser"

- , GET, .

+4

: - .

"" , proxy-webservice , .

+5

All Articles