We help IT Professionals succeed at work.

Everlasting Cookies.

RICHARDH
RICHARDH asked
on
Is it possible to set a Cookie that will last for ever and not have an expiry date.

thanks for the help.
Comment
Watch Question

CERTIFIED EXPERT
Top Expert 2005
Commented:
This will create a cookie that won't expire until long after we're gone...

Expire = new Date(2100, 0, 1);
CookieName = "NameOfCookie";
ValueString = escape("This is the cookie text")

document.cookie = CookieName + " = " + ValueString + "; expires = " + Expire.toGMTString();

CERTIFIED EXPERT
Top Expert 2005

Commented:
Richard,

Have any of these comments helped you? If so, please accept one of them as an answer.

Thank you,

Fritz the Blank
RICHARDH:

You have many open questions:

http://www.experts-exchange.com/jsp/qShow.jsp?qid=11342298
http://www.experts-exchange.com/jsp/qShow.jsp?qid=11355858
http://www.experts-exchange.com/jsp/qShow.jsp?qid=11382838
http://www.experts-exchange.com/jsp/qShow.jsp?qid=11415199
http://www.experts-exchange.com/jsp/qShow.jsp?qid=11670638
http://www.experts-exchange.com/jsp/qShow.jsp?qid=20001107
http://www.experts-exchange.com/jsp/qShow.jsp?qid=20004454
http://www.experts-exchange.com/jsp/qShow.jsp?qid=20065368
http://www.experts-exchange.com/jsp/qShow.jsp?qid=20073152
http://www.experts-exchange.com/jsp/qShow.jsp?qid=20084825
http://www.experts-exchange.com/jsp/qShow.jsp?qid=20084821
http://www.experts-exchange.com/jsp/qShow.jsp?qid=20086663
http://www.experts-exchange.com/jsp/qShow.jsp?qid=20086784
http://www.experts-exchange.com/jsp/qShow.jsp?qid=20107892
http://www.experts-exchange.com/jsp/qShow.jsp?qid=20109405
http://www.experts-exchange.com/jsp/qShow.jsp?qid=20109357
http://www.experts-exchange.com/jsp/qShow.jsp?qid=20109887
http://www.experts-exchange.com/jsp/qShow.jsp?qid=20110886
http://www.experts-exchange.com/jsp/qShow.jsp?qid=20117400
http://www.experts-exchange.com/jsp/qShow.jsp?qid=20118020
http://www.experts-exchange.com/jsp/qShow.jsp?qid=20118934
http://www.experts-exchange.com/jsp/qShow.jsp?qid=20118648
http://www.experts-exchange.com/jsp/qShow.jsp?qid=11342618
http://www.experts-exchange.com/jsp/qShow.jsp?qid=20130049
http://www.experts-exchange.com/jsp/qShow.jsp?qid=20132692
http://www.experts-exchange.com/jsp/qShow.jsp?qid=20142937
http://www.experts-exchange.com/jsp/qShow.jsp?qid=20146293
http://www.experts-exchange.com/jsp/qShow.jsp?qid=20147289
http://www.experts-exchange.com/jsp/qShow.jsp?qid=20148615
http://www.experts-exchange.com/jsp/qShow.jsp?qid=20149087
http://www.experts-exchange.com/jsp/qShow.jsp?qid=20148609
http://www.experts-exchange.com/jsp/qShow.jsp?qid=20150501
http://www.experts-exchange.com/jsp/qShow.jsp?qid=20150630
http://www.experts-exchange.com/jsp/qShow.jsp?qid=20154720
http://www.experts-exchange.com/jsp/qShow.jsp?qid=20154865
http://www.experts-exchange.com/jsp/qShow.jsp?qid=20154980
http://www.experts-exchange.com/jsp/qShow.jsp?qid=20155947
http://www.experts-exchange.com/jsp/qShow.jsp?qid=20180018
http://www.experts-exchange.com/jsp/qShow.jsp?qid=20189434
http://www.experts-exchange.com/jsp/qShow.jsp?qid=20193459
http://www.experts-exchange.com/jsp/qShow.jsp?qid=20222409
http://www.experts-exchange.com/jsp/qShow.jsp?qid=20235436
http://www.experts-exchange.com/jsp/qShow.jsp?qid=20244279
http://www.experts-exchange.com/jsp/qShow.jsp?qid=20244276
http://www.experts-exchange.com/jsp/qShow.jsp?qid=20193051
http://www.experts-exchange.com/jsp/qShow.jsp?qid=20256056
http://www.experts-exchange.com/jsp/qShow.jsp?qid=20257136
http://www.experts-exchange.com/jsp/qShow.jsp?qid=20257135
http://www.experts-exchange.com/jsp/qShow.jsp?qid=20127746
http://www.experts-exchange.com/jsp/qShow.jsp?qid=20259971
http://www.experts-exchange.com/jsp/qShow.jsp?qid=20259964

To assist you in your cleanup, I'm providing the following guidelines:

1.  Stay active in your questions and provide feedback whenever possible. Likewise, when feedback has not been provided by the experts, commenting again makes them receive an email notification, and they may provide you with further information. Experts have no other method of searching for questions in which they have commented, except manually.

2.  Award points by hitting the Accept Comment As Answer button located above and to the left of that expert's comment.

3.  When grading, be sure to read:
http://www.experts-exchange.com/jsp/cmtyQuestAnswer.jsp#3
to ensure that you understand the grading system here at EE. If you grade less than an A, you must explain why.

4.  Questions that were not helpful to you should be PAQ'd (stored in the database for their valuable content?even if not valuable to you) or deleted. To PAQ or delete a question, you must first post your intent in that question to make the experts aware. Then, if no experts object after three full days, you can post a zero-point question at community support to request deletion or PAQ. Please include the link(s) to the question(s).
CS:  http://www.experts-exchange.com/jsp/qList.jsp?ta=commspt
At that point, a moderator can refund your points and PAQ or delete the question for you. The delete button does not work.

5.  If you fail to respond to this cleanup request, I must report you to the Community Support Administrator for further action.

Our intent is to get the questions cleaned up, and not to embarrass or shame anyone. If you have any questions or need further assistance at all, feel free to ask me in this question or post a zero-point question at CS. We are very happy to help you in this task!


thanks!
amp
community support moderator

1/27

Author

Commented:
Thanks for the help.
Problem now solved.

Richard

Explore More ContentExplore courses, solutions, and other research materials related to this topic.