can a javascript document know the url from where is being loaded (not the referer) without url rewriting.
I load http://qqsd.foo/blabla.js loaded on my html page and I want my blabla.js script know this url and the parameters it could have passed.
can a javascript document know the url from where is being loaded (not the referer) without url rewriting.
I load http://qqsd.foo/blabla.js loaded on my html page and I want my blabla.js script know this url and the parameters it could have passed.
You could try this
<script src="http://qqsd.foo/blabla.js" id="blabla"></script>
then in your blabla.js file
alert(document.getElementById("blabla").getAttribute("src"))