Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Java

the browser doesn't take me to the index page depending on the saved cookie , its like the cookie is not there

i see the cookie in browser dev tools , however every time the whole page and form are loaded without taking into consideration the saved cookie

2 Answers

minh nguyen
minh nguyen
55,848 Points

Hi, it depends on which domain the cookie belongs to. For example, cookie of teamtreehouse would not log you in for another sites except the same site.

i visit the same site , still the cookie is not used

minh nguyen
minh nguyen
55,848 Points

The cookie is a small piece of data which often contain a token to authenticate you to a site, it is rarely used for saving form data, you can take a look at session lessons on Treehouse for a backend language, for example PHP etc. If you modify the cookie content; in the server side, it is possible to detect that you cookie information was changed or not from the last time the server issued the cookie, usually base on hashing a secret phrase, user id and timestamp of an event.