Home > DeveloperSection > Forums > How to create endless cookie?
Takeshi Okada
Takeshi Okada

Total Post:89

Posted on    October-06-2014 12:57 AM

 ASP.Net ASP.Net  C# 

 1 Reply(s)
 847  View(s)
Rate this:
i'm want to make endless cookie how to possible

Kamlakar Singh
Kamlakar Singh

Total Post:194

Posted on    October-06-2014 12:58 AM

Not strictly endless, but you can set the cookie lifetime to two years or so which comes pretty close:

·         session.cookie-lifetime ini setting

·         session_set_cookie_params()Docs function to set them programmatically.

The session cookie won't be deleted then if the user closes the browser.

Take care that your session data store keeps the data as well that long. This is important. And keep in mind that you need to store all user's data for this large time-span, so you should have enough space available.

This does not work at all if the user disables cookies in her or his browser.

Don't want to miss updates? Please click the below button!

Follow MindStick