Finding expiration date of cookie

Discussion in 'Perl Misc' started by Jason Carlton, Dec 8, 2009.

  1. Is there any way to find the expiration date of a set cookie?

    I'm setting a cookie in one script, and the expiration date is set
    dynamically. In another script, I want to set another cookie, and want
    to match the expiration date to the one set in the earlier script.

    TIA,

    Jason
    Jason Carlton, Dec 8, 2009
    #1
    1. Advertising

  2. Jason Carlton

    smallpond Guest

    On Dec 7, 8:27 pm, Jason Carlton <> wrote:
    > Is there any way to find the expiration date of a set cookie?
    >
    > I'm setting a cookie in one script, and the expiration date is set
    > dynamically. In another script, I want to set another cookie, and want
    > to match the expiration date to the one set in the earlier script.
    >


    perldoc CGI
    smallpond, Dec 8, 2009
    #2
    1. Advertising

  3. On Dec 7, 11:19 pm, smallpond <> wrote:
    > On Dec 7, 8:27 pm, Jason Carlton <> wrote:
    >
    > > Is there any way to find the expiration date of a set cookie?

    >
    > > I'm setting a cookie in one script, and the expiration date is set
    > > dynamically. In another script, I want to set another cookie, and want
    > > to match the expiration date to the one set in the earlier script.

    >
    > perldoc CGI


    I've looked there, and didn't see any way to retrieve this
    information. I know how to set it (obviously), just not retrieve it.

    Can you be more specific?
    Jason Carlton, Dec 8, 2009
    #3
  4. Jason Carlton

    smallpond Guest

    On Dec 8, 4:07 am, Jason Carlton <> wrote:
    > On Dec 7, 11:19 pm, smallpond <> wrote:
    >
    > > On Dec 7, 8:27 pm, Jason Carlton <> wrote:

    >
    > > > Is there any way to find the expiration date of a set cookie?

    >
    > > > I'm setting a cookie in one script, and the expiration date is set
    > > > dynamically. In another script, I want to set another cookie, and want
    > > > to match the expiration date to the one set in the earlier script.

    >
    > > perldoc CGI

    >
    > I've looked there, and didn't see any way to retrieve this
    > information. I know how to set it (obviously), just not retrieve it.
    >
    > Can you be more specific?



    Is it not in the hash when you read the cookie?
    What do you get when you do this:
    %answers = cookie('answers');
    $k = join "\n", keys %answers
    print $k;
    smallpond, Dec 8, 2009
    #4
    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. Brian

    Cookie Expiration

    Brian, Jul 28, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    418
    Brian
    Jul 28, 2003
  2. =?Utf-8?B?T2xlZyBMZWlraW4=?=

    COOKIE EXPIRATION TIME

    =?Utf-8?B?T2xlZyBMZWlraW4=?=, Aug 1, 2004, in forum: ASP .Net
    Replies:
    15
    Views:
    1,111
    Scott M.
    Aug 4, 2004
  3. =?Utf-8?B?QmlsbCBCb3Jn?=

    Trying to understand ticket/cookie expiration

    =?Utf-8?B?QmlsbCBCb3Jn?=, Oct 8, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    349
    =?Utf-8?B?QmlsbCBCb3Jn?=
    Oct 8, 2004
  4. =?Utf-8?B?QmlsbCBCb3Jn?=

    What relationship between cookie and ticket expiration?

    =?Utf-8?B?QmlsbCBCb3Jn?=, Dec 22, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    374
    =?Utf-8?B?QmlsbCBCb3Jn?=
    Dec 23, 2004
  5. Peter Grison

    Date, date date date....

    Peter Grison, May 28, 2004, in forum: Java
    Replies:
    10
    Views:
    3,226
    Michael Borgwardt
    May 30, 2004
Loading...

Share This Page