Need a workaround for cross domain ajax post in IE

2019-06-26 09:12发布

So IE7 does not support CORS (cross origin resource sharing). However, due to nature of my app, I have to make a cross domain ajax post. Is there some way to get this to work in IE7? Unfortunately, I cannot use a server side proxy for security reasons. Perhaps using an iFrame?

I forgot to mention, but I control the other server also.

2条回答
\"骚年 ilove
2楼-- · 2019-06-26 09:37

The Easy XDM library was developed to solve the cross origin problem :

easyXDM is a Javascript library that enables you as a developer to easily work around the limitation set in place by the Same Origin Policy, in turn making it easy to communicate and expose javascript API’s across domain boundaries.

I didn't use it yet, but we might have to try it to solve a Http / HTTPS Ajax call problem...

Hope that helps.

Other threads of interests :

查看更多
爷的心禁止访问
3楼-- · 2019-06-26 09:38

Do it the old fashioned way: post the form to an iframe using the external domain. You can listen to the onload event on the iframe to know it has completed.

The other option is to use a server-side proxy and post it from there.

查看更多
登录 后发表回答