From the Apple developer faq
Safari ships with a conservative cookie policy which limits cookie writes to only the pages chosen (\"navigated to\
This is an issue known as Same Origin Policy. Essentially it is a security measure against creating security loopholes.
When you have an iframe that points to a page on your own domain, JavaScript can access both the page you're on and the page within the Iframe. This is an acceptable parent to child and child to parent relationship.
(parent doc) (iframe doc)
HTML --> IFRAME <-- HTML
^--------|---------^
However, once you have a file pointing to an external page, SOP comes into play and haults any information passing between the parent page and the iframe page.
(parent doc) (iframe doc)
HTML --> IFRAME <-- HTML
X
Check out this post about iframe communication, it makes a lot of sense! Stackoverflow post
These links really help too!
1) Secure Cross-Domain Communication in the Browser
2) wiki SOP or Same Origin Policy
Good luck!