Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Completely Cookie  :)

Posted on 2006-11-17
3
Medium Priority
?
347 Views
Last Modified: 2006-11-18
I've been informed that:
cookies are like such:

VisitNumber  <-- cookie name
5                 <-- cooke value
localhost/     <-- domain/path that can access the cookie
1024            <-- cookie type
1522925568 <-- expire date/time
29894292     <-- expire date/time
1043531296 <-- modified date/time
29820999     <-- modified date/time
*  <-- end

cookie type:  im not really sure where these come from or what they mean other than if they were client created(javascript) vs server created(asp).  it also indicates whether the connection is secure by adding a value of one to the number.
client created:  1088, 1104, 1600
server created: 1024, 1536, 3584
a secure server created example would be 1024 + 1 = 1025

the expire and modified date and times are based on nano seconds.  the second field has a max number of 2^32 or 4,294,967,296 (i had to look that up).  the first field counts how many times the second field has maxed out.  so above, the expire second field has hit the max value 1,522,925,568 times.  
to start on the date we take that number and multiply by the max value:
1,522,925,568 * 4,294,967,296 = 6,540,915,508,802,224,128
then we add whats in the second field:
6,540,915,508,802,224,128 + 29,894,292 = 6,540,915,508,832,118,420
now you have the number of nanoseconds from january 1, 1601 12:00:00am (utc)



how can I get these values?
0
Comment
Question by:kevp75
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 9

Accepted Solution

by:
deathtospam earned 1800 total points
ID: 17965764
Here's some basic info on Cookies in ASP:

* MSDN - Setting Cookies in ASP using Response.Cookies: http://tinyurl.com/y64j46
* MSDN - Retrieving Cookies in ASP using Request.Cookies: http://tinyurl.com/y5tjrn
* General Tutorial - http://www.earthskater.net/devzone/asp/aspcookies.asp


I'm fairly certain that your ability to access cookies -- via ASP/VBScript, anyway -- is extremely limited, probably for security reasons.  All you can really do once a cookie is set, is display the names and values stored inside the cookie.  I don't believe you can access all of those properties you described above.


-= DeathToSpam =-
0
 
LVL 22

Assisted Solution

by:WMIF
WMIF earned 200 total points
ID: 17967121
i thought that you might have been able to get to the expire date, but according to that msdn article, nope.  oh well, at least you know what the cookie files mean now. :)
0
 
LVL 25

Author Comment

by:kevp75
ID: 17968053
thank you both.   I do understand how to set/retrieve cookies....my question was how to get the other stuff....but I see from those articles that those other keys are write-only....
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I recently decide that I needed a way to make my pages scream on the net.   While searching around how I can accomplish this I stumbled across a great article that stated "minimize the server requests." I got to thinking, hey, I use more than one…
Have you ever needed to get an ASP script to wait for a while? I have, just to let something else happen. Or in my case, to allow other stuff to happen while I was murdering my MySQL database with an update. The Original Issue This was written…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question