/    Sign up×
Community /Pin to ProfileBookmark

Automatic Cookie Delete

Hey I’m new to the concept of cookies. Is there any way that a cookie can be created, then 12 hours later it is automatically deleted? Thanks

to post a comment
HTML

5 Comments(s)

Copy linkTweet thisAlerts:
@cbVisionApr 27.2012 — Yes, all cookies have an expiration. You would just set it for 12 hours.
Copy linkTweet thisAlerts:
@CharlesApr 27.2012 — Well, not so much as deleted; cookies have expiration dates. How are you creating these cookies? PHP? JavaScript?
Copy linkTweet thisAlerts:
@bvmailauthorApr 27.2012 — JavaScript, sorry should have said that.

What I'm Trying to do (for a school tech project) is put a specific number into a textbox, then after it is put in once, the user cannot put the same number in again for 12 hours.
Copy linkTweet thisAlerts:
@CharlesApr 27.2012 — See http://www.w3schools.com/js/js_cookies.asp for details. But remember, only a certain number of cookies will be stored at a time by a browser and only a certain, limited number of users use JavaScript. But those might not be a problem with your application.
Copy linkTweet thisAlerts:
@bvmailauthorApr 27.2012 — See http://www.w3schools.com/js/js_cookies.asp for details. But remember, only a certain number of cookies will be stored at a time by a browser and only a certain, limited number of users use JavaScript. But those might not be a problem with your application.[/QUOTE]

Thanks that site was extremely helpful.
×

Success!

Help @bvmail spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.17,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...