Solved

cookie expire

Posted on 2000-05-07
1
172 Views
Last Modified: 2010-03-05
do any one know how long does the cookie of experts-exchange.com last?

I would like to set cookie like EE, but i don't know how long it should last.

Thanks.
0
Comment
Question by:bighuen
[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
1 Comment
 
LVL 16

Accepted Solution

by:
maneshr earned 10 total points
ID: 2788481
"do any one know how long does the cookie of experts-exchange.com last? "

you can find that out for yourself. if you are using NS look at your cookies.txt file. in it you will find an entry that looks something like...

..experts-exchange.com      TRUE      /      FALSE      1900195130      login      16739:hsWRAr0dF60w2k

Each line in the cookies.txt file represents a single piece of stored information. A tab is inserted between each of  the fields.

 From left-to-right, here is what each field represents:

 domain - The domain that created AND that can read the variable.
 flag - A TRUE/FALSE value indicating if all machines within a given domain can access the
 variable. This value is set automatically by the browser, depending on the value you set
 for domain.
 path - The path within the domain that the variable is valid for.
 secure - A TRUE/FALSE value indicating if a secure connection with the domain is needed
 to access the variable.
 expiration - The UNIX time that the variable will expire on. UNIX time is defined as the number of seconds since Jan 1, 1970 00:00:00 GMT.
 name - The name of the variable.
 value - The value of the variable.


So as you can see in the cookie above the expiration is set to 1900195130 seconds since  Jan 1, 1970 00:00:00 GMT.
==========================================

here is a small PERL/CGI program using which you can set your own cookie.

the cookie expires on mon 27th Nov.

===my_cookie.pl

#!/usr/local/bin/perl

print "Set-Cookie: back=yes; path=/; expires:Mon, 27-Nov-2000 23:00:59 GMT\n";
print "Content-type: text/html\n\n";
  print qq{
  <B>Cookie set successfully!!/B>
 };


in order to check if the cookie is set, enable "Warn before cookie is set" option in your browser.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
HTTP Error 502.2 - Bad Gateway 3 233
PHP equivalent of opening a com object 5 94
Replace  text in a file 2 124
get the last nth lines from a an array if nth element is xxx 2 75
Email validation in proper way is  very important validation required in any web pages. This code is self explainable except that Regular Expression which I used for pattern matching. I originally published as a thread on my website : http://www…
A year or so back I was asked to have a play with MongoDB; within half an hour I had downloaded (http://www.mongodb.org/downloads),  installed and started the daemon, and had a console window open. After an hour or two of playing at the command …
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…

733 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