How Google Maps javascript bypasses "same origin policy"

Just out of curiosity I was wondering how javascript code can be used to embed google maps with a server from an external domain. I know I am missing something here. can anyone help?

thanks

+2


a source to share


1 answer


Because it writes an iframe which then makes a request to google (so no javascript is loaded from outside the domain)



REV. ... Google Maps actually uses JSONP. It loads pages as elements <script>

and then the script calls a callback method that is already defined in your page.

-1


a source







All Articles