Netscape vs. IE Cookie Difference

J

JJ_377

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
 
G

Grant Wagner

--
Grant Wagner <[email protected]>
comp.lang.javascript FAQ - http://jibbering.com/faq
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top