Just came across an excellent article by Michael Mahemoff on cross-domain communications using iframes.
Michael Mahemoff has given a very good summary on “the 4 laws of iframe communications“:
- Law I: Any window in the hierarchy can get a handle to any other window in the hierarchy.
- Law II: Windows can only access each others’ internal state if they belong to the same domain.
- Law III: Any window in the hierarchy can set (but not read) any other window’s location/URL, even though (from Law II) browser security policies prevent different-domain iframes from accessing each other’s internal state.
- Law IV: When you change the URL’s fragment identifier (the bit on the end starting with a #, e.g. http://example.com/blah#fragmentID), the page doesn’t reload.
You can read the full article here:
Cross-domain Communications with Iframes
no comments
RSS / trackback