www.webdeveloper.com
Results 1 to 6 of 6

Thread: Automatic Cookie Delete

  1. #1
    Join Date
    Apr 2011
    Posts
    6

    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

  2. #2
    Join Date
    Sep 2008
    Location
    Akron, OH
    Posts
    1,126
    Yes, all cookies have an expiration. You would just set it for 12 hours.
    I'm always up for networking with fellow web professionals. Connect with me on LinkedIn if you like!

  3. #3
    Join Date
    Nov 2002
    Location
    Baltimore, Maryland
    Posts
    12,270
    Well, not so much as deleted; cookies have expiration dates. How are you creating these cookies? PHP? JavaScript?
    “The power of the Web is in its universality. Access by everyone regardless of disability is an essential aspect.”
    —Tim Berners-Lee, W3C Director and inventor of the World Wide Web

  4. #4
    Join Date
    Apr 2011
    Posts
    6
    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.

  5. #5
    Join Date
    Nov 2002
    Location
    Baltimore, Maryland
    Posts
    12,270
    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.
    “The power of the Web is in its universality. Access by everyone regardless of disability is an essential aspect.”
    —Tim Berners-Lee, W3C Director and inventor of the World Wide Web

  6. #6
    Join Date
    Apr 2011
    Posts
    6

    Thumbs up

    Quote Originally Posted by Charles View Post
    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.
    Thanks that site was extremely helpful.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles