开发者

Cross-Domain + iFrame Question

We are creating a "widget" for our site and wanted to ensure we have got this right.

I realize this all relates to X-Browser permissions but little worried about how this works with like Cookies and permission开发者_如何学编程s ?


You should take a look at easyXDM, its a library that provides cross-domain communication, for instance between the parent page and the widget. One of the more advanced examples can be found at http://consumer.easyxdm.net/current/example/methods.html

As easyXDM supports context, you can easily use cookies in the embedded window to provide authentication etc.


Cookies are tied to the domain, so any code in the parent will be unable to read cookies set in the site contained within the iframe I'm afraid.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜