By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,299 Members | 1,210 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,299 IT Pros & Developers. It's quick & easy.

Netscape vs. IE Cookie Difference

P: n/a
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

Jul 23 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a


--
Grant Wagner <gw*****@agricoreunited.com>
comp.lang.javascript FAQ - http://jibbering.com/faq
<JJ****@hotmail.com> wrote in message
news:11**********************@c13g2000cwb.googlegr oups.com...
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


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 <gw*****@agricoreunited.com>
comp.lang.javascript FAQ - http://jibbering.com/faq
Jul 23 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.