Hmm, seems I jumped the gun - IE isn't setting the cookie.
This is the code in setcookie.php:
Code:
<?php
$ProfileID = $_GET['ProfileID'];
setcookie("ProfileID", $ProfileID, time()+3600);
$data = '{}'; // json string
if(array_key_exists('callback', $_GET)){
header('Content-Type: text/javascript; charset=utf8');
header('Access-Control-Allow-Origin: http://www.example.com/');
header('Access-Control-Max-Age: 3628800');
header('Access-Control-Allow-Methods: GET, POST, PUT, DELETE');
$callback = $_GET['callback'];
echo $callback.'('.$data.');';
}else{
// normal JSON string
header('Content-Type: application/json; charset=utf8');
echo $data;
}
?>
This is the JavaScript code on the remote server:
Code:
var cnttime = new Date()
callURL = 'http://remotedomain/setcookie.php?ProfileID=' + ProfileID + '&timout=' + cnttime.getTime();
$.ajax({
url: callURL,
dataType: 'jsonp',
cache: false,
success:function(response){
},
error:function(XMLHttpRequest, textStatus, errorThrown){
}
});
It works in Firefox & Chrome, but not IE 
Any thoughts?