Is it possible to set a cookie at www.domain.com/cookie
Code ASP:<% 'create the cookie Response.Cookies("Will") = "Hello Mr Cookie" %>
and read it from www.domain.com?
Where do I specify the path to write and where do I specify the path to read it?
Printable View
Is it possible to set a cookie at www.domain.com/cookie
Code ASP:<% 'create the cookie Response.Cookies("Will") = "Hello Mr Cookie" %>
and read it from www.domain.com?
Where do I specify the path to write and where do I specify the path to read it?
If you set the cookie at the /cookie level and do not define the Path, then only pages in /cookie (and below) will be able to get it. However if you set it with the root path then all pages within the website will be able to get it.
Code ASP:<% 'create the cookie Response.Cookies("Will") = "Hello Mr Cookie" Response.Cookies("Will").Path = "/" %>
Thanks. That solved it.