Same origin policy - Subdomains and Root Domain

吃可爱长大的小学妹 提交于 2019-11-29 09:19:02

The things that define a domain in this context are protocol, port and domain so http://abc.com and https://abc.com are considered different domains by your browser (http vs https).

http://en.wikipedia.org/wiki/Same_origin_policy#Origin_determination_rules

https://x.company.org and https://y.company.org are also considered separate domains but they can both relax their domain setting to https://company.org and cross-communicate.

http://en.wikipedia.org/wiki/Same_origin_policy#document.domain_property

There's another option available to you now as HTML5 is in all the major browsers. Using the HTML5 postMessage you can communicate across domains, assuming the receiving domain wants to accept the message and respond.

http://html5demos.com/postmessage2

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!