473,747 Members | 2,946 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Reading Cookie Expiration

I must be having a "senile" day! I cannot recall, nor get to work, code
to read a cookie's expiration date/time in an ASP page/VBScript.

What am I missing?

*** Sent via Developersdex http://www.developersdex.com ***
Feb 10 '06 #1
9 5520
Mike Reed wrote on 10 feb 2006 in comp.lang.javas cript:
I must be having a "senile" day! I cannot recall, nor get to work, code
to read a cookie's expiration date/time in an ASP page/VBScript.

What am I missing?


Nothing.

A cookie sits on the client.

Cann't even be done from a browser script,
and certainly not with server script..
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Feb 10 '06 #2
Servers can read client cookies! There would be little reason for a
server to set a cookie if it couldn't read it back. I'm referring to
cookies my server set, and is readingcback. I want to access the
"expires" value of those cookies.

I all but positive I've read the "expires" value with server-side
VBScript in the past. I just cannot recall the syntax, nor can I find it
in any references.

*** Sent via Developersdex http://www.developersdex.com ***
Feb 10 '06 #3
Mike Reed wrote on 10 feb 2006 in comp.lang.javas cript:
Servers can read client cookies!


Please always quote on usenet!
This is not private email.
Others could want to follow and comment.

===============

Servers cannot read the client as such.
Servers can only read what the client browser sends to the server.
The Cookie string is sent in the page request.
Cookie expiration date is not sent.
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Feb 10 '06 #4
Thank you, Evertjan! I guess that's why Idon't recall how to code it -
'cause I never have,

Thought that came back with the cookie value.

Thanks for setting me straight.

Mike

*** Sent via Developersdex http://www.developersdex.com ***
Feb 10 '06 #5
Another way would be to send the exp date as a "suffix" to the text of the
cookie.
you then have to split the cookie before you use it; but you always know how
long before the thing expires
Feb 10 '06 #6
Mike Reed wrote on 10 feb 2006 in comp.lang.javas cript:
Thank you, Evertjan! I guess that's why Idon't recall how to code it -
'cause I never have,

Thought that came back with the cookie value.

Thanks for setting me straight.


I still think it is unacceptable that you do not quote!!!!

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Feb 10 '06 #7
Reading Cookie Expiration
From: Mike Reed
Date Posted: 2/10/2006 9:02:00 AM

I must be having a "senile" day! I cannot recall, nor get to work, code
to read a cookie's expiration date/time in an ASP page/VBScript.

What am I missing?

*** Sent via Developersdex http://www.developersdex.com ***

Re: Reading Cookie Expiration
From: Evertjan.
Date Posted: 2/10/2006 9:10:00 AM

Mike Reed wrote on 10 feb 2006 in comp.lang.javas cript:
I must be having a "senile" day! I cannot recall, nor get to work, code to read a cookie's expiration date/time in an ASP page/VBScript.

What am I missing?

Nothing.

A cookie sits on the client.

Cann't even be done from a browser script,
and certainly not with server script..
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Re: Reading Cookie Expiration
From: Mike Reed
Date Posted: 2/10/2006 9:35:00 AM

Servers can read client cookies! There would be little reason for a
server to set a cookie if it couldn't read it back. I'm referring to
cookies my server set, and is readingcback. I want to access the
"expires" value of those cookies.

I all but positive I've read the "expires" value with server-side
VBScript in the past. I just cannot recall the syntax, nor can I find it
in any references.

*** Sent via Developersdex http://www.developersdex.com ***
Re: Reading Cookie Expiration
From: Evertjan.
Date Posted: 2/10/2006 9:40:00 AM

Mike Reed wrote on 10 feb 2006 in comp.lang.javas cript: Servers can read client cookies!
Please always quote on usenet!
This is not private email.
Others could want to follow and comment.

===============

Servers cannot read the client as such.
Servers can only read what the client browser sends to the server.
The Cookie string is sent in the page request.
Cookie expiration date is not sent.
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Re: Reading Cookie Expiration
From: Mike Reed
Date Posted: 2/10/2006 9:49:00 AM

Thank you, Evertjan! I guess that's why Idon't recall how to code it -
'cause I never have,

Thought that came back with the cookie value.

Thanks for setting me straight.

Mike

*** Sent via Developersdex http://www.developersdex.com ***
Re: Reading Cookie Expiration
From: mrHoo
Date Posted: 2/10/2006 10:32:00 AM

Another way would be to send the exp date as a "suffix" to the text of
the
cookie.
you then have to split the cookie before you use it; but you always know
how
long before the thing expires


Re: Reading Cookie Expiration
From: Evertjan.
Date Posted: 2/10/2006 11:49:00 AM

Mike Reed wrote on 10 feb 2006 in comp.lang.javas cript:
Thank you, Evertjan! I guess that's why Idon't recall how to code it -
'cause I never have,

Thought that came back with the cookie value.

Thanks for setting me straight.


I still think it is unacceptable that you do not quote!!!!

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)

I apolgize for not quoting! You're right, of course. Should have cut and
pasted from the Web page. Didn't occur to me. I will in any and all
future posts.

Mike

*** Sent via Developersdex http://www.developersdex.com ***
Feb 10 '06 #8
Mike Reed wrote on 10 feb 2006 in comp.lang.javas cript:
I apolgize for not quoting! You're right, of course. Should have cut and
pasted from the Web page. Didn't occur to me. I will in any and all
future posts.


Better use a dedicated [free] news reader, instead of some web interface.

This will let you quote according to netiquette.

Google groups will do, though not as easy,
if your ISP has no news server,
but then do the folowing:

If you want to post a followup via groups.google.c om, don't use the
"Reply" link at the bottom of the article. Click on "show options" at the
top of the article, then click on the "Reply" at the bottom of the article
headers. <http://www.safalra.com/special/googlegroupsrep ly/>

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Feb 10 '06 #9
Mike Reed wrote:
I must be having a "senile" day! I cannot recall, nor get to work, code
to read a cookie's expiration date/time in an ASP page/VBScript.

What am I missing?


That this is not a VBScript newsgroup.
PointedEars
Feb 10 '06 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
4515
by: Christophe Lance | last post by:
Hello, I use PHP session cookie to store an id number. I know how to set a cookie expiration date using the setcookie function, but how to set an expiration date when the cookie is created by the session_start function ? I know the cookie expires after the session ends, but when I look at my HTTP headers, the cookie's expiration date created by the session is set to 19
7
2144
by: Christoph Pieper | last post by:
Hi, we've the following problem : We have an asp-application which sets the cookie on first login. The cookie will never be touched during user access. The user can work the whole day, but after 6 to 7 hours, the cookie get 2-4 new asp-sessionid's thus overwriting the very first entries in the cookie. Does anyone had the same problem or has a solution. The server is a w2003 enterprise the client has windows xp sp2.
15
3649
by: Oleg Leikin | last post by:
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 ?
0
1891
by: Kepler | last post by:
I'm testing very basic FormsAuthentication and having trouble with non-persistent cookies. Once authenticated with a non-persistent cookie, if I leave the browser alone for 30 minutes, Request.IsAuthenticated returns false on my next request. WHY? At first I thought it had to do with session timeout, but session timeout is set to 20 minutes, and I'm still authenticated after 20 minutes. Thirty minutes is the magic number. I'm at a loss...
2
1879
by: Bill Borg | last post by:
Hello all, I am working on forms authentication and trying to understand: what's the relationship between the cookie expiration and the ticket expiration? I create a cookie and I add an encrypted ticket to it. Both of these have an expiration date, but I'm not seeing how to use them. Does it make sense that these dates would ever differ? Thanks,
2
1935
by: Jeff Bowman | last post by:
Here's the code: Private Sub SetCookie(ByVal tcEmail As String) Dim loCookie As New HttpCookie("Email") loCookie.Value = Utils.StringToBase64(tcEmail) loCookie.Expires = Now.AddYears(10) Response.Cookies.Add(loCookie) End Sub The cookie appears to accept the specified expiration date (i.e. #7/13/2015
15
2137
by: Edwin Knoppert | last post by:
I have searched but info is limitted. In my test app i used a non persistant cookie for forms authentication. slidingExpiration is set to true On run and close and rerun the login remains ok. I have a time-out of one minute and indeed, it directs me to the login if i wait to long. The slidingExpiration does it's work also.
5
2226
by: SJ | last post by:
Hi, In my website, i have a cookie that allows the user to remain logged in for upto 90days. So I'm setting the cookie expiration time to 90 days in the future from the time the user logs in. I've been testing my code and for some reason, the cookie expires randomly before even 24 hrs has passed. Yesterday it expired after 11hrs and 20mins. Any idea why my cookie expiration isn't working?
29
3008
by: Jerim79 | last post by:
I did try to find the answer to this before posting, so this isn't a knee jerk reaction. What I am trying to accomplish is to have a script that opens a cookie, reads a value, and then use a switch/case to take action based on that value in the cookie. I want to set the cookie manually, so I don't need setcookie(). I see that in PHP it stores the cookie in memory. Is there a way to have PHP just read a cookie from the desktop machine?...
0
8979
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8818
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9522
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9354
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9307
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9223
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6790
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6067
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4860
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.