if cookies are disabled, does asp.net store the cookie as a session cookie instead or not?
Posted
by Erx_VB.NExT.Coder
on Stack Overflow
See other posts from Stack Overflow
or by Erx_VB.NExT.Coder
Published on 2009-12-24T05:03:15Z
Indexed on
2010/03/26
11:03 UTC
Read the original article
Hit count: 421
basically, if cookeis are disabled on the client, im wondering if this...
dim newCookie = New HttpCookie("cookieName", "cookieValue")
newCookie.Expires = DateTime.Now.AddDays(1)
response.cookies.add(newCookie)
notice i set a date, so it should be stored on disk, if cookies are disabled does asp.net automatically store this cookie as a session cookie (which is a cookie that lasts in browser memory until the user closes the browser, if i am not mistaken).... OR does asp.net not add the cookie at all (anywhere) in which case i would have to re-add the cookie to the collection without the date (which stores as a session cookie)... of course, this would require me doing the addition of a cookie twice... perhaps the second time unnecessarily if it is being stored in browsers memory anyway... im just trying not to store it twice as it's just bad code!! any ideas if i need to write another line or not? (which would be)...
response.cookies.add(New HttpCookie("cookieName", "cookieValue") ' session cookie in client browser memory
thanks guys
© Stack Overflow or respective owner