473,385 Members | 1,798 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

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 5472
Mike Reed wrote on 10 feb 2006 in comp.lang.javascript:
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.javascript:
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.javascript:
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.javascript:
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.javascript: 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.javascript:
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.javascript:
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.com, 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/googlegroupsreply/>

--
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
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...
7
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...
15
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...
0
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,...
2
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...
2
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)...
15
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....
5
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....
29
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...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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...

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.