473,385 Members | 1,312 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

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="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
1 1411


--
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Henry Hartley | last post by:
I've got a PHP system working on a development server (Windows 2000/IIS5/PHP 4.3.3) but it doesn't seem to be working quite right on the testing server (same except PHP 4.2.3). I upgraded the PHP...
8
by: Matt | last post by:
I want to know if user disable cookie, will the session still working? Actually I remember we could disable cookie in IE before (not sure what version, but I couldn't see the option anymore. Now I...
4
by: A Web Master | last post by:
I am designing a site for a client where I have a frameset and 3 frames (all in ASP). I am creating session variables in the frameset that need to be accessed in the frames. It seams that in...
4
by: Yvan J. Gagnon | last post by:
I am encountering a strange problem in Netscape 7 with a CFM file I am trying to troubleshoot (the page is working fine in NS Communicator and IE). Below is a sample of the problematic line of...
14
by: Gerald S. | last post by:
Hello, I am trying to set the space between the bullet and the first word in a UL, without any luck. My Lists look like: x Item 1 x Item 2 x Item 3
15
by: Oleg Leikin | last post by:
Hi, (newbie question) I've created some simple .NET ASP application that should store cookies at the client machine. According to the documentation cookie expiration time is set via...
0
by: Earl Teigrob | last post by:
Basically, I need a variable that is UNIQUE TO EACH BROWSER WINDOW. By setting a cookie with no expiration date in an IE browser, I create a session cookie where the cookie value is held in the...
3
by: Wysiwyg | last post by:
After a server created cookie is processed on the client I want it removed, cleared, or expired in the javascript block but have been unable to do this. If I set a cookie value in the server code...
8
by: LayneMitch via WebmasterKB.com | last post by:
I'm supposed to develop a page that asks info as form values and when you hit "submit" it takes you to a page that reads the values you entered into the first page and displays those values in a...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.