Link to home
Start Free TrialLog in
Avatar of shahrahulb
shahrahulb

asked on

cookie

i m seeting the cookie and then checking if the cookie exists after the setting the cookie, it says cookie not exists. if i refresh the page and check back it says cookie exists.

why so?
ASKER CERTIFIED SOLUTION
Avatar of manav_mathur
manav_mathur

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of ozo
The browser cannot set the cookie until it sees the page which sets it.
The browser can only send cookies to a page after the browser has set the cookie.

Normally cookies are set in one page and read in another.
This allows different pages to share data with each other.