Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Deleting Cookies?

  • 16-04-2002 10:34am
    #1
    Registered Users, Registered Users 2 Posts: 4,225 ✭✭✭


    I'm working on an web asp application that uses a cookie to store some info about a user when they have logged in to the asp application. (Not invasive, just stuff they'll need to actually use the application)
    Creating the cookie on login is fine but i can't seemd to remove or delete the cookie at all once they go to log out.

    I'm mainly using VBscript for the asp pages.

    Any help would be appreciated.


Comments

  • Closed Accounts Posts: 6,601 ✭✭✭Kali


    cookies are always a bit of a pain, but depending on how you initialised it, it should just be a case of setting the expiry date to some date in the past.

    if you want an exact answer post up your code where you create the cookie.


  • Closed Accounts Posts: 28 eating




  • Registered Users, Registered Users 2 Posts: 476 ✭✭Pablo


    Originally posted by eating
    http://javascript.about.com/cs/cookies/

    well worth a read chum :D
    good tutorial there mate


  • Closed Accounts Posts: 19,777 ✭✭✭✭The Corinthian


    Use the Session object - the lifespan of the cookie becomes immaterial then as once you abandon the session, the ID in the cookie will become invalid.


  • Registered Users, Registered Users 2 Posts: 706 ✭✭✭DJB


    A view ways to do this...

    Set the cookie first with code like this:

    response.cookies("security")("username") = Request.Form("username")
    response.cookies("security")("password") = Request.Form("password")

    When you want to delete the cookie you can use code like this:

    response.cookies("security")("username") = ""
    response.cookies("security")("password") = ""

    This will leave the cookie on the users machine but delete the contents of the cookie. Modify the above to suit your needs.

    Regards,

    Dave


  • Advertisement
Advertisement