A persistent cookie is a cookie which is keeps in a cookie file permanently on the browser's computer. By default, cookies are formed as temporary cookies which keep only in the browser's memory. When the browser is closed, temporary cookies will be erased. You should decide when to use temporary cookies and when to use persistent cookies based on their differences:
* Temporary cookies cannot be used for tracking long-term information.
* Persistent cookies can be used for tracking long-term information.
* Temporary cookies are safer due to no programs other than the browser can access them.
* Persistent cookies are less secure due to users can open cookie files see the cookie values