I'm trying to set a cookie from a extern php in my website. I found this question, but its still unresolved Set-Cookie on Browser with Ajax Request via CORS
Basically my php looks like this.
<?php
ob_start();
setcookie("cookiename", "cookiedata", time() + 10000000, '/', false, false);
ob_end_flush();
header('Access-Control-Allow-Origin: *');
?>
The header response is like this:
Access-Control-Allow-Orig... *
Connection Keep-Alive
Content-Length 0
Content-Type text/html
Date Wed, 01 Oct 2014 20:53:51 GMT
Keep-Alive timeout=5, max=100
Server Apache/2.4.3 (Win32) OpenSSL/1.0.1c PHP/5.4.7
Set-Cookie cookiename=cookiedata; expires=Sun, 25-Jan-2015 14:40:31 GMT; path=/
X-Powered-By PHP/5.4.7
I can't see the cookie in the firebug tab (neither with other browser debuggers). When I console.log() all the cookies in javascript it does not appear either. So I don't know if someone can guide me through this. Thanks.