开发者

Masquerade/change HTTP_USER_AGENT string permanently using JavaScript?

Is there a way to cha开发者_高级运维nge/modify the value of user-agent string permanently using JavaScript?


You mean from a web page inside a browser?

No, definitely not. Neither permanently nor temporarily.


You can't even modify navigator.userAgent (at least on my test with Firefox).

So, no.


Try this.

alert("User-agent header sent: " + navigator.userAgent);
navigator.__defineGetter__('userAgent', function(){ return "Hello" });
alert("User-agent header sent: " + navigator.userAgent);
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜