Connecting Tech Pros Worldwide Help | Site Map

Netscape vs. IE Cookie Difference

JJ_377@hotmail.com
Guest
 
Posts: n/a
#1: Jul 23 '05
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="CookieName" and strContent-"cookieValue"):

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

results in the following results in IE and NS:

IE:
CookieName=cookieValue;SITE=GN; ST_GN_US_EN=2_12517...

NS:
CookieName=cookieValue

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
Guest
 
Posts: n/a
#2: Jul 23 '05

re: Netscape vs. IE Cookie Difference




--
Grant Wagner <gwagner@agricoreunited.com>
comp.lang.javascript FAQ - http://jibbering.com/faq
<JJ_377@hotmail.com> wrote in message
news:1106739346.835122.121420@c13g2000cwb.googlegr oups.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="CookieName" and strContent-"cookieValue"):
>
> document.cookie = name + "=" + strContent + ";"
>
> results in the following results in IE and NS:
>
> IE:
> CookieName=cookieValue;SITE=GN; ST_GN_US_EN=2_12517...
>
> NS:
> CookieName=cookieValue
>
> 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@agricoreunited.com>
comp.lang.javascript FAQ - http://jibbering.com/faq


Closed Thread