开发者

Cross Domain JSONP over HTTPS

开发者 https://www.devze.com 2023-03-31 12:47 出处:网络
I am using JSONP over HTTP on different domains (say http://a.com and http://b.com) to exchanges messages.

I am using JSONP over HTTP on different domains (say http://a.com and http://b.com) to exchanges messages.

It works fine. My qu开发者_开发百科estion is, if I switch both host protocols to HTTPS despite the fact that they are on a different domains. Will they continue to work fine without any warning popup warning in IE6?

Thanks


Yes, it will continue to work. Changing the protocol is the same effect as changing any other part of the URL -- it will trigger a violation of the same-origin policy and force you into cross-domain mode. If you already have cross-domain access working, it will continue to work with https as well as it did with http.

Note that you'll still need to deal with the situation where one or both of your secure sites has invalid certificate credentials. If you try to execute an AJAX method against a secure URL with a non-trusted or expired certificate the browser will warn your user about that, regardless of how or what you're trying to do.

0

精彩评论

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