A page by JS created an IFRAME called the B page
The cookie on page b in Firefox can be read out on page a
But to the IE 9 is not, how to solve it?
Reply content:
A page by JS created an IFRAME called the B page
The cookie on page b in Firefox can be read out on page a
But to the IE 9 is not, how to solve it?
Based on security, browsers are not allowed to operate across domains (of course, you can set cookies to be shared between sub-domains).
If you want to achieve a full sense of cross-domain operations (any two domain names), it is recommended that the landlord use PostMessage (such as: Http://github.com/daepark/postmessage), it with the help of modern browser window.postmessage , it will use the window location hash polling for browsers that do not support window.postmessage, so browser compatibility is good.
Example:
-Botong recruitment and integration of PHP100 using the Postmessage.js Library (http://bbs.php100.com/job/), Botong Recruitment page through the IFRAME fully integrated into the Php100.com page, two domain names through the postmessage to do some control page height, page jump and other things.
The main requirement is simply that a page requires some data, but the data in other sites, need to find ways to catch.
If it's just your own gadget, it's not compatible with IE.
If you need to consider compatibility, the description is a formal project, generally encountered this cross-domain problem can find back-end classmates to help. Cross-domain security restrictions are for the browser side, there is no cross-domain security restrictions on the server side. Back end has phantomjs such as headless browser and a variety of crawlers can go to other sites to grab data, and then made Ajax interface for you, good happy.