• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 177
  • Last Modified:

cookie expire

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
bighuen
Asked:
bighuen
1 Solution
 
maneshrCommented:
"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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now