PUT request for cross domain url fails only in IE

I want to make a PUT request in another domain. But the script crashes only in IE.

I found out what the problem is: in IE, if you looked at the tab "Internet Options"> "Security"> "User Level"> "Miscellaneous"> "Access to data sources for all domains", it was disabled. The only way I was able to get the job done with my request is to set the Allow parameter.

So my question is: is there a way to get this to work without forcing end users to set this option?

There is XDomainRequest () that can be used for XDomain requests in IE, but this method does not support PUT.

+4
source share
2 answers

IE9 and later do not support the PUT method in a cross-domain request. Only GET and POST.

+6
source

You can use a library like Xdomain or EasyXDM to get an alternative to CORS by hacking a mail message.

I prefer to use Xdomain because it captures its own XMLHTTPRequest and provides a drop-in solution. EasyXDM forces you to use their APIs, which means more overhead for conditional coding, however it does support IE6 / IE7.

Chief take away? Do not stop supporting CORS! Just make IE act and abandon the future.

0
source

Source: https://habr.com/ru/post/1493306/


All Articles