is it possible to know when cookies aren being expired ?

Discussion in 'Javascript' started by Mel, Mar 16, 2005.

  1. Mel

    Mel Guest

    i need my application to goto a URL when the cookies are expired. this way i
    can log them out of my system altogether

    thanks
     
    Mel, Mar 16, 2005
    #1
    1. Advertising

  2. Mel

    Randell D. Guest

    Mel wrote:

    > i need my application to goto a URL when the cookies are expired. this way i
    > can log them out of my system altogether
    >
    > thanks
    >
    >
    >


    I have several months of javascript under my belt - I'm still
    learning... but I'm sure someone here has already asked something
    similar to this year - and I believe the answer is no...

    there are probably work-arounds, but nothing is guaranteed - you could
    (I guess) have a script that loops on every page, reading the cookie, or
    performing some sort of time check - from either (or both)of those
    checks, you could force the document.location to point to your logout
    page. However - this goes with the usual warnings - if javascript or
    cookies are disabled,then your testing would be worthless. To be more
    certain you'd be better of having a mix of client and server based checks...

    hope that helps,
    randelld
     
    Randell D., Mar 17, 2005
    #2
    1. Advertising

  3. *** Mel wrote/escribió (Wed, 16 Mar 2005 08:42:16 -0500):
    > i need my application to goto a URL when the cookies are expired. this way i
    > can log them out of my system altogether


    I you mean reading the expiration date of a cookie, as far as I know you
    cannot. But I don't think you need so. It highly depends on what you want
    to accomplish, but you can just set a cookie named expiration_date that
    lasts till year 2025.


    --
    -- Álvaro G. Vicario - Burgos, Spain
    -- Don't e-mail me your questions, post them to the group
    --
     
    Alvaro G Vicario, Mar 17, 2005
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?VHlzb24gQnJvd24=?=

    SetAuthCookie works, but our cookies aren't being written - HELP

    =?Utf-8?B?VHlzb24gQnJvd24=?=, May 3, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    424
  2. douha
    Replies:
    1
    Views:
    313
    Toby Inkster
    Jan 4, 2007
  3. _Who
    Replies:
    7
    Views:
    2,685
  4. Iams

    Events aren't being fired

    Iams, Mar 17, 2005, in forum: ASP .Net Datagrid Control
    Replies:
    0
    Views:
    126
  5. Andries

    I know, I know, I don't know

    Andries, Apr 23, 2004, in forum: Perl Misc
    Replies:
    3
    Views:
    238
    Gregory Toomey
    Apr 23, 2004
Loading...

Share This Page