Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > is it possible to know when cookies aren being expired ?

Reply
Thread Tools

is it possible to know when cookies aren being expired ?

 
 
Mel
Guest
Posts: n/a
 
      03-16-2005
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



 
Reply With Quote
 
 
 
 
Randell D.
Guest
Posts: n/a
 
      03-17-2005
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
 
Reply With Quote
 
 
 
 
Alvaro G Vicario
Guest
Posts: n/a
 
      03-17-2005
*** 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
--
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Give Request.Cookies and Response.Cookies is there any reason to use another method to use cookies? _Who ASP .Net 7 09-18-2008 07:49 PM
Why aren't filenames being lowercased? Peter Bailey Ruby 6 08-01-2007 01:51 PM
Why aren't key strokes being recognized when a certain table row has focus? douha HTML 1 01-04-2007 07:11 PM
Events aren't being fired Iams ASP .Net Datagrid Control 0 03-17-2005 09:51 PM
SetAuthCookie works, but our cookies aren't being written - HELP =?Utf-8?B?VHlzb24gQnJvd24=?= ASP .Net 1 05-04-2004 04:27 AM



Advertisments