Here is what I'm looking to do (pseudo-code):
Imagine the name of the cookie in the example is "visited" and it contains nothing.
if visited exists
then alert("hello again");
else
create visited - should expire in 10 days;
alert("This is your first time!")
How can I achieve this in JavaScript?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…