https://developer.mozilla.org/en/HTTP_access_control
https://developer.mozilla.org/en/Same_origin_policy_for_JavaScript
Mozilla considers two pages to have the same origin if the protocol, port (if one is specified), and host are the same for both pages. The following table gives examples of origin comparisons to the URL http://store.company.com/dir/page.html:
URL | Outcome | Reason |
---|---|---|
http://store.company.com/dir2/other.html | Success | |
http://store.company.com/dir/inner/another.html | Success | |
https://store.company.com/secure.html | Failure | Different protocol |
http://store.company.com:81/dir/etc.html | Failure | Different port |
http://news.company.com/dir/other.html | Failure | Different host |
No comments:
Post a Comment