in reply to Yet another question about cookies.

I haven't used HTTP::Cookies::Microsoft, but it looks like it's designed to run on a client machine and poke around inside the Web browser's cookie files. If you're application is running on a Web server and wants to set cookies in clients that connect to it, the standard cookie modules (like CGI::Cookie) will work fine with any modern client, including MSIE.

I can understand your confusion, since CGI::Cookie talks a lot about "Netscape Cookies". It just calls them that becuase Netscape invented cookies; nowadays they're not Netscape-specific; in fact, they're Documented Standards.

  • Comment on Re: Yet another question about cookies.

Replies are listed 'Best First'.
Re^2: Yet another question about cookies.
by enhering (Sexton) on Jun 07, 2006 at 03:04 UTC
    And what about this node:
    http://www.perlmonks.org/?node_id=532936
    I'm really confused about this. I tried using the code below to set a cookie on a visitor's browser:
    #- Set Cookie -------------------------------------------------------- +---------# sub setCookie { # end a set-cookie header with the word secure and the cookie will o +nly # be sent through secure connections my ($name, $value, $expiration, $path, $domain, $secure) = @_; print "Set-Cookie: "; print ($name, "=", $value, "; expires=", $expiration, "; path=", $path, "; domain=", $domain, "; ", $secure, "\n"); }
    And it works fine on Firefox. On MSIE, cookies are saved on another file, named gabuleu.com (my domain name). When the user calls my website from a MSIE, nothing is retrieved. On the other side, when I test it using firefox, cookies are retrieved.Maybe CGI::Cookie handles this. I haven't tried it.

      In Re: Why cookies do not work on some users' windows PC?, the OP had some kind of compatability issue trying to manually create a cookie header, which he may or may not have eventually resolved.

      My guess is that there's some bug in your cookie code, and Mozilla is willing to ignore it while MSIE isn't. You can read through the HTTP cookie specifications carefully, look for some example code, compare your code to working code, etc. Or you can use a module like CGI::Cookie, where the author has already done all of this work for you.