httpcookie
what is the default expiration time of a cookie
The default Expires value for a cookie is not a static time, but it creates a Session cookie. This will stay active until the user closes their browser/clears their cookies. You can override this as required. From the linked page: Setting the Expires property to MinValue makes this a session Cookie, which is its default … Read more
Using Cookie in Asp.Net Mvc 4
Try using Response.SetCookie(), because Response.Cookies.Add() can cause multiple cookies to be added, whereas SetCookie will update an existing cookie.
Cookie path and its accessibility to subfolder pages
If we set the cookie to path ‘/subfolder1’, will the cookie will be made available to any page or subfolder beneath the folder? Yes. The cookie will be available to all pages and subdirectories within the /subfolder1 path.