Netscape vs. IE Cookie Difference

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • JJ_377@hotmail.com

    #1

    Netscape vs. IE Cookie Difference

    What is the reason for the difference between the way Netscape 7.1 (NS)
    makes a cookie and Internet Explorer 6 (IE) makes one in the following
    case:

    The following JavaScript cookie assignment statement (with variables
    name="CookieNam e" and strContent-"cookieValu e"):

    document.cookie = name + "=" + strContent + ";"

    results in the following results in IE and NS:

    IE:
    CookieName=cook ieValue;SITE=GN ; ST_GN_US_EN=2_1 2517...

    NS:
    CookieName=cook ieValue

    In IE, what is the suffix is that IE assigns to the cookie (the string
    following the semi-colon) and where this behavior is documented?
    My thanks!

    Jules

  • Grant Wagner

    #2
    Re: Netscape vs. IE Cookie Difference



    --
    Grant Wagner <gwagner@agrico reunited.com>
    comp.lang.javas cript FAQ - http://jibbering.com/faq
    <JJ_377@hotmail .com> wrote in message
    news:1106739346 .835122.121420@ c13g2000cwb.goo glegroups.com.. .[color=blue]
    > What is the reason for the difference between the way Netscape 7.1
    > (NS)
    > makes a cookie and Internet Explorer 6 (IE) makes one in the following
    > case:
    >
    > The following JavaScript cookie assignment statement (with variables
    > name="CookieNam e" and strContent-"cookieValu e"):
    >
    > document.cookie = name + "=" + strContent + ";"
    >
    > results in the following results in IE and NS:
    >
    > IE:
    > CookieName=cook ieValue;SITE=GN ; ST_GN_US_EN=2_1 2517...
    >
    > NS:
    > CookieName=cook ieValue
    >
    > In IE, what is the suffix is that IE assigns to the cookie (the string
    > following the semi-colon) and where this behavior is documented?
    > My thanks!
    >
    > Jules[/color]

    Can you post the code that duplicates this behavior?

    <script type="text/javascript">
    var name = 'CookieName';
    var strContent = 'CookieValue';
    document.cookie = name + "=" + strContent + ";"
    alert(document. cookie);
    </script>

    I do not see the behavior you descript in IE 6.0.2900.

    I am guessing your Web server is probably writing cookies of it's own
    when you visit your test page. Check the Web server configuration to
    ensure it is not sending any cookies during requests. You can also check
    the HTTP headers using something like Firefox's Live HTTP Headers
    Extension to see if the server is sending cookies.

    --
    Grant Wagner <gwagner@agrico reunited.com>
    comp.lang.javas cript FAQ - http://jibbering.com/faq


    Comment

    Working...