I'm using dojo.cookie to store and retrieve cookie values. It works great on a single page. However, if I store a cookie on one page and try to retrieve it on another (still within the same website), it returns null. Is there a way to share a cookie across multiple pages within a website? I'm not sure if this is a dojo.cookie issue or a browser/cookie issue.
A:
Hm, I seem to recall issues with cookies and localhost, you might try adding an entry to %SystemRoot%\system32\drivers\etc\hosts
:
127.0.0.1 my.localhost.com
and then set the cookie as in your first comment but, when you hit the page, use http://my.localhost.com
instead of http://localhost
.
kschneid
2010-08-04 04:20:43
Works, thanks!!
Justin
2010-08-05 14:38:53