php - Cookie less subdomain -


i have website

example.com

and cname subdomain

static.example.com

for css/js/img files, load without cookies in header

im using codeigniter set cookies, config.php

$config['cookie_domain']    = "example.com";  //not  .example.com 

but when im open google chrome console says cookies set .example.com

is okey? mean cookies set subdomains anyway?

im using codeigniter built-in cookies, im loading autoloader helper.

and setting cookies that

$cookie = array(     'name'   => 'lang',     'value'  => $lang,     'expire' => '86500',     'path'   => '/',     'secure' => false ); set_cookie($cookie); 

yes, should fine. initial . on domain means cookie applies domain , subdomains. if cookie domain example.com, wouldn't apply static.example.com. see what dot prefix in cookie domain mean?


Comments

Popular posts from this blog

sublimetext3 - what keyboard shortcut is to comment/uncomment for this script tag in sublime -

java - No use of nillable="0" in SOAP Webservice -

ubuntu - Laravel 5.2 quickstart guide gives Not Found Error -