So, I have this page on one domain with a script -tag pointing to a different domain, and every time I refresh the page, a new session_id is generated. This only happens in IE, all other browsers work.
Here is a sample code (JS and PHP)
http://domain1.com/index.php :
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled Document</title> <script src="http://domain2.com/index.php"></script> </head> <body> </body> </html>
And at http://domain2.com/index.php :
<?php session_start(); header("content-type: application/x-javascript"); echo "alert('".session_id()."');"; ?>
Open Chrome or Firefox in the domain1.com/index.php domain and you will see a warning window with a session ID. Every time you update, you always have the same session id. In IE (I tried with 7, 8, and 9), the session id is always different. Cookies do not seem to be saved properly.
Thanks for any help.
Frank source share