I have two pages: a.example.com and b.example.com
a.example.com includes jQuery
a.example.com contains an iframe pointing to b.example.com
both pages have document.domain set to the same parent domain, example.com
How can I use jQuery include from a.example.com to call $ .ajax ({url: " b.example.com "}) from within b.example.com iframe?
In other words: both pages can currently access Javascript from each other, but I can't get the AJAX call to function without throwing an XSS error. That is, without including jQuery on b.example.com too. How do I avoid including jQuery twice?
Example iframe content:
<script> document.domain = "example.com"; function proxyAjax() { var jQueryParent = parent.$.sub(); </script>
source share