开发者

Make GET request with auth header

I'm trying to refactor a xhr call to a different domain to something a little more portable(works only in ie if you change settings)

It's a GET request with AUTH header I want to make. There can be no user input. So far I've tried.

<a href="http://user:pass@domain">test</a> --- won't work in ie. Works in chrome
<meta http-equiv="refresh" content="开发者_运维问答1; url=http://user:pass@domain">  --- won't work in ie. Only works in chrome

Today it uses setRequestHeader on XMLHttpRequest. Any ideas?


Internet Explorer does not support user names and passwords in Web site addresses

By default, versions of Windows Internet Explorer that were released starting with the release of security update 832894 do not support handling user names and passwords in HTTP and HTTP with Secure Sockets Layer (SSL) or HTTPS URLs. The following URL syntax is not supported in Internet Explorer or in Windows Explorer:

http(s)://username:password@server/resource.ext

there are also some "Workarounds for application and Web site developers" that should help you solving your problem.

also, theres a fix (download-link) that disabled this new default behavior again.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜