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.
Ok the problem was the path. To be visible in all the page the path must be "/"
cookie.setPath("/")
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With