JS script dont send cookies

JS script dont send cookies

Hello.

There is a web page with JS script (use Jquery 2.1.4). The page is located on my PC.
1 ) JS script do get request via ajax to PHP script. The php script located on internet web site.
2) The PHP script return header: Set-Cookie PHPSESSID=r9uu08ora41aaogsulop11kdb1; path=/
3) So JS script send next ajax GET request, but cookie not send. Why ?

Help me please.


PHP sent header('Access-Control-Allow-Origin: *')

JS see like:

console.log('request 1');
$.ajax({
url: " http://site.com/index.php",
beforeSend: function(xhr){
xhr.withCredentials = true;
},
crossDomain: true,
})


console.log('request 2');
$.ajax({
url: " http://site.com/index.php",
beforeSend: function(xhr){
xhr.withCredentials = true;
},
crossDomain: true,
})