Solved

cookie expire

Posted on 2000-05-07
1
166 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
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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

I have been pestered over the years to produce and distribute regular data extracts, and often the request have explicitly requested the data be emailed as an Excel attachement; specifically Excel, as it appears: CSV files confuse (no Red or Green h…
In the distant past (last year) I hacked together a little toy that would allow a couple of Manager types to query, preview, and extract data from a number of MongoDB instances, to their tool of choice: Excel (http://dilbert.com/strips/comic/2007-08…
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…
In a recent question (https://www.experts-exchange.com/questions/28997919/Pagination-in-Adobe-Acrobat.html) here at Experts Exchange, a member asked how to add page numbers to a PDF file using Adobe Acrobat XI Pro. This short video Micro Tutorial sh…

809 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