Adam is correct. There are no significant differences. That I can remember, the only difference is that netscape 4.07 breaks if the cookie isn't terminated with a ; (don't ask me how I found that out)
Assuming that you have the correct format, there should be no differences. Also, as Adam pointed out, you should be safer with CGI::Cookie or the cookie() function in CGI.pm. If you still feel the need to print the cookie yourself, you can use this (copied straight from perldoc):
my $c = new CGI::Cookie(-name => 'foo',
-value => ['bar','baz'],
-expires => '+3M');
print "Set-Cookie: $c\n";
print "Content-Type: text/html\n\n";
I hope that helps.
#!/home/bbq/bin/perl
# Trust no1!
| [reply] [d/l] |
There shouldn't be any significant differences, but you might find things easier if you use the cookie() function in CGI.pm | [reply] |
Hi Guys,
What about 'permanent' and 'session(temporary)' cookies?
IE 5.x has the option to turn off/on two different kinds of cookies. The 'permanent' cookies are stored under 'C:\WINDOWS\Cookies' and are still there after you close your browser. The 'session' cookies are stored under 'C:\WINDOWS\Temporary Internet Files\Content.IE5' and expire after you close your browser.
How do you specify what kind of cookie to store if a user has both enabled?
Also, don't forget about IE's cookie vulnerability, that allows anyone to read your cookies from another site.
My version of IE was affected.
Check out the following site for info:
http://www.peacefire.org/security/iecookies/ or if you just want the patch go to: http://www.microsoft.com/windows/ie/download/critical/patch11.htm
"cRaZy is co01, but sometimes cRaZy is cRaZy".
- crazyinsomniac | [reply] |
The difference between a 'permanent' cookie and a 'session' cookie is when it's set to expire. If you don't set an expiration date, the cookie's supposed to go away when the user closes the browser.
If you do set a date, the cookie's supposed to last until that date.
Bugs and incomplete implementations of the specification mean your experience may vary. :)
| [reply] |