Based on Please explain JSONP , I understand that JSONP can be used to circumvent a policy of the same origin.
But for this, the page must use the <script> .
I know that pages can dynamically generate new script tags, for example:
<script type="text/javascript" language='javascript'> document.write('<script type="text/javascript" ' + 'id="contentloadtag" defer="defer" ' + 'src="javascript:void(0)"><\/script>'); var contentloadtag=document.getElementById("contentloadtag"); contentloadtag.onreadystatechange=function(){ if (this.readyState=="complete") { init(); } } </script>
(the above works in IE, do not think that it works in FF).
... but does this really mean that every JSONP call requires me to release another <script> in the document? Can I remove the <script> tags that have been executed?
source share