Re: Question about cookies.

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



Hey Roland, Have a look at this article,
http://www.thescripts.com/serversidescripting/asp/articles/page1.html . This
guy says that if you don't set the Expires property then the cookie is
destroyed when the user closes his/her browser. I have done that and it does
destroy the cookie.

Sorry man but you need to update you knowledge about cookies.

Joe


"Roland Hall" wrote:

> "Joe" wrote in message
> news:C2DA98A8-DFFC-4977-8148-6BD34913EABF@xxxxxxxxxxxxxxxx
> : I want to use cookies instead of session variables for better performance
> on
> : a website.
>
> Better performance?
>
> : But I would like to expire cookie as soon as the user closes the
> : browser window.
>
> Sorry Charlie. The browser would have to update the server that it was
> leaving and that just doesn't happen.
>
> : Just like session variable,
>
> Sessions do not expire when the client closes the browser. The expire when
> they're explicitly told to expire or they time out. The default is 20
> minutes.
>
> : cookie should expire after
> : browser window is closed.
>
> It will, based on the termination date/time.
>
> : Can someone tell me if this possible.
>
> Never seen it done.
>
> : If it is how
> : should I do it.
>
> Prayer perhaps. (O:=
>
> : Thanks for your time.
>
> No problem.
>
> --
> Roland Hall
> /* This information is distributed in the hope that it will be useful, but
> without any warranty; without even the implied warranty of merchantability
> or fitness for a particular purpose. */
> Technet Script Center - http://www.microsoft.com/technet/scriptcenter/
> WSH 5.6 Documentation - http://msdn.microsoft.com/downloads/list/webdev.asp
> MSDN Library - http://msdn.microsoft.com/library/default.asp
>
>
>
.



Relevant Pages

  • (auto) session expire
    ... minutes of inactivity. ... When user is inactive for 10 minutes the session will expire. ... The browser will delete the cookie because it was told by the server. ...
    (php.general)
  • Re: deleting cookies and local browser time versus server time
    ... based on what *it* thinks the time is, not what the server thinks the ... looks to be 3 or 4 hours in the past to my browser. ... give a cookie to expire at 4PM today, which is the time in Seattle, ...
    (comp.lang.php)
  • Re: Batch php to loggoff web site
    ... In your scripts, check if the time is between, say 08:00 and 21:00. ... If the user has closed their browser or does not refresh the page, ... can't remove the cookie. ... cookie to expire ten minutes ahead. ...
    (comp.lang.php)
  • cookies shorter than a session?
    ... I'm trying to set a cookie to expire 10 seconds after it is created. ... it seems to last until I close all browser windows. ...
    (comp.lang.javascript)
  • 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)