Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Windows IE Cookies

by Jonas (Beadle)
on Aug 17, 2000 at 02:15 UTC ( [id://28220]=perlquestion: print w/replies, xml ) Need Help??

Jonas has asked for the wisdom of the Perl Monks concerning the following question:

Hey folks,

I'm using the "Set-Cookie: $name=$value; etc" method on one of
my sites. It's probably going to see a lot of traffic and I was
wondering if Windows IE has a different format for its cookies
than Netscape/Mozilla, and if so what are the differences.

Thanks in advance,
j

Replies are listed 'Best First'.
(bbq) Re: Windows IE Cookies
by BBQ (Curate) on Aug 17, 2000 at 02:35 UTC
    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!
Re: Windows IE Cookies
by Adam (Vicar) on Aug 17, 2000 at 02:18 UTC
    There shouldn't be any significant differences, but you might find things easier if you use the cookie() function in CGI.pm
(crazyinsomniac) Re: Windows IE Cookies
by crazyinsomniac (Prior) on Aug 17, 2000 at 03:41 UTC
    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

      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. :)

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://28220]
Approved by root
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (3)
As of 2024-04-25 10:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found