[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

cookie expire

Posted on 2000-05-07
1
Medium Priority
?
175 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 40 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

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

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

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…
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…
Six Sigma Control Plans

656 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