CGI::Cookie Setting Expiry

From: Robert TV (ducott_99_at_yahoo.com)
Date: 06/09/04


Date: Tue, 08 Jun 2004 23:43:32 GMT

Hello,

I got the basic coding from perdoc on the usage of use CGI::Cookie. The main
examples show an expiry of '+3M' which they say means 3 months. I would
like my cookie to expire after 10 minutes. Does anyone know the equivalent
value? I cannot locate any other info in perdoc on this issue. Another
question I would like to ask is ... if a cookie is expired, will it still
return data if fetched? Can Perl read the cookie and determine its expiry
time and print that data to screen?

[Why I'm Asking]
I am trying to build a timeout subroutine for my program. When a user logs
in, a cookie is set for 10 minutes. Each primary subroutine of the program
will check the cookie to make sure its not expired and data is being
returned, if not, user is directed back to login page. I am doing this to
prevent bookmarking of the software once logged in. If the cookie had not
expired, it writes a new 10 minute cookie then shows the relevant dat for
that section/subroutine.

TIA!! Robert



Relevant Pages

  • Re: Setting Cookie.Expires
    ... As for the Cookie expire time, it does have been set on the cookie (you add ... Microsoft MSDN Online Support Lead ... from the community or a Microsoft Support ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Question about cookies.
    ... Hey Roland, Have a look at this article, ... destroyed when the user closes his/her browser. ... destroy the cookie. ... > Sessions do not expire when the client closes the browser. ...
    (microsoft.public.scripting.vbscript)
  • Re: Cookies in non-server pages?
    ... Why do you assume it was my intention to let the cookie ... >> most computers the time behaves more like GMT than UTC)? ... >Because this is but an example for a cookie that will not expire by the end ... So why use a deprecated method when a non-deprecated one will do the ...
    (comp.lang.javascript)
  • "Page has expired" - again
    ... The web site has anonymous access and the only cookie ... >This sounds like a scripting issue on the site. ... they are set to expire. ... >>major like converting POST to GET etc. ...
    (microsoft.public.windows.inetexplorer.ie6.browser)
  • Re: PageLoad when BACK is clicked
    ... not expire. ... >> And then also create a cookie with a timestamp (and ... Otherwise reload the page. ... >Outgoing mail is certified Virus Free. ...
    (microsoft.public.dotnet.framework.aspnet.webcontrols)