Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

JavaScript document.cookie has less info than Chrome cookie resource explorer

When I print out document.cookie in the Chrome console, I see the following...

document.cookie
"__qca=P0-1877502676-1384254012269; 
__utma=140029553.512150271.1384254012.1388335027.1388410832.76; 
__utmz=140029553.1388335027.75.53.utmcsr=google|utmccn=(organic)|utmcmd=organic|utmctr=(not%20provided); 
_ga=GA1.2.512150271.1384254012"

But when I look into the Resources > cookies tab I see the following...

Screen shot of Chrome cookies

It seems document.cookie isn't returing all the cookies that Chrome is reporting in the Resources tab.

Anyone know why this is? Thanks in advance :)

like image 285
Jimbo Avatar asked Oct 22 '25 03:10

Jimbo


1 Answers

Cookies can be set to http-only mode by the server, it tells the browser to not give javascript access to them.

like image 73
yent Avatar answered Oct 23 '25 16:10

yent