Re: COOKIE EXPIRATION TIME

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

From: S. Justin Gengo (sjgengo_at_aboutfortunate[no-spam)
Date: 08/01/04


Date: Sun, 1 Aug 2004 15:50:07 -0500

Oleg,

You could use a javascript to enter the client's time into a hidden form
field.

Of course this information would then have to be posted back before setting
the cookie...

Something like this:

<script language="Javascript">
<!--
document.Form1.myHiddenField.value = new Date()
//-->
</script>

-- 
Sincerely,
S. Justin Gengo, MCP
Web Developer / Programmer
www.aboutfortunate.com
"Out of chaos comes order."
                            Nietzsche
"Oleg Leikin" <OlegLeikin@discussions.microsoft.com> wrote in message
news:91CA0EFD-CE4E-44A8-BCDA-0862EF59BC62@microsoft.com...
> Hi,
>
> (newbie question)
>
> I've created some simple .NET ASP application that should store cookies at
the client machine.
>
> According to the documentation cookie expiration time is set via
HttpCookie.Expires property, but property value is the time of day on the
client.
>
> How can I possibly know client local time ?
>
>
> Thanks in advance !!!
>


Relevant Pages

  • Re: executing javascript and vbscript
    ... by javascript, so the request pulls the old value. ... Communication between the server and the client happens in one direction at ... So the cookie is set using your client side JavaScript AFTER all the cookies ...
    (comp.lang.javascript)
  • RE: Cookies
    ... my problem is that i create a cookie on the server using ... but then i want to change the value of the cookie in the client using ... > in javascript. ...
    (microsoft.public.dotnet.languages.csharp)
  • Javascript cant delete server created cookie with no domain?
    ... After a server created cookie is processed on the client I want it removed, ... or expired in the javascript block but have been unable to do this. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Warning: Cannot modify header information
    ... > I had looked into the header.php and founf that the line 6 was the ... I removed the javascript and it all works fine. ... output to the client. ... Now the cookie is set before the output starts. ...
    (alt.php)
  • Re: Tier3 today - And Flex-it like NASDAQ (*Only better!*)
    ... FlexBuilder, or just working on the FABridge functionality in general, you ... ArrayCollections are completely accessible via the Javascript in ... Broadcasted server to client messages, ...
    (comp.os.vms)