Strange Javascript/cross site cookies problem -
I'm running a PHP script that is running on domain B, when some generates JS
The idea is that in the given html page I can have:
So when the page loads, the script is called and the JS is generated and run on the local page.
The problem is that depending on myscript.php b domain cookies if I type in my address bar, the script works fine, and I see JS text in the browser window.
But when I include the quoted line above in the webpage running on a different webserver, call it A, it does not work. JS is still generated, but this is incorrect, Because there is no cookie available on the script.
So, in a nutshell, access the script directly, cookies are available, all are well accessed by calling the script from the page provided from any other domain and it does not have access to cookies.
I do not understand that due to the call to a script run on the B domain, the browser does not seem to send cookies to B?
This is a security feature, cookie information is never available for any other domain than the cookie set up. See: for more information
Comments
Post a Comment