Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cookies doesn't appears in Chrome Console Resources tab

I'am working an a Grails app and create different cookies.

Some appears in the chrome console Resources TAB and some are not showing.

I need to get the value of these Cookies using Angularjs and can access only the one that are showing on console Resources TAB.

The other cookies are visible in the Chrome Content settings button. In the Cookies section, but not in the Chrome console Resources TAB.

All cookies are created the same way:

Cookie cookie = new Cookie("username", username)
cookie.maxAge = 1209600 //14 days
cookie.httpOnly = true
response.addCookie(cookie)

Thanks for your help.

like image 964
Merlin Avatar asked Jan 18 '14 18:01

Merlin


1 Answers

Ok the problem was the path. To be visible in all the page the path must be "/"

cookie.setPath("/")
like image 138
Merlin Avatar answered Nov 18 '22 10:11

Merlin