---
title: "How to create endless cookie?"  
description: "How to create endless cookie?"  
author: "Takeshi Okada"  
published: 2014-10-06  
updated: 2014-10-06  
canonical: https://www.mindstick.com/forum/2312/how-to-create-endless-cookie  
category: "asp.net"  
tags: ["c#", "asp.net"]  
reading_time: 1 minute  

---

# How to create endless cookie?

i'm want to make endless cookie how to possible

## Replies

### Reply by Anonymous User

Not strictly endless, but you can set the cookie lifetime to two years or so which comes pretty close:

· [session.cookie-lifetime ini setting](http://www.php.net/manual/en/session.configuration.php#ini.session.cookie-lifetime)

· [session_set_cookie_params()*Docs*](http://www.php.net/manual/en/function.session-set-cookie-params.php) 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](http://www.php.net/manual/en/session.configuration.php#ini.session.gc-maxlifetime). 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.


---

Original Source: https://www.mindstick.com/forum/2312/how-to-create-endless-cookie

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
