Forum Moderators: open

Message Too Old, No Replies

Windows XP SP 2 and Internet Explorer

Does the new IE have problems with JS cookies?

         

AWildman

4:45 pm on Jun 23, 2004 (gmt 0)

10+ Year Member



I'm trying out the new Win XP SP 2 using IE 6.02 on my sites. They use JS cookies. However, IE (haven't tried NN yet) will not set the cookie! Has anyone had much experience with this yet? Yes, I did check to see that the browser is allowing cookies and that its JS enabled. I've cleared cookies, history, and temp files a million times. I AdAware-d it and restarted. Nothing worked. The JS is working everywhere else.

Any ideas?

Rambo Tribble

4:53 pm on Jun 23, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Although your problem sounds more severe than I would expect from failure to adhere to the new P3P standards, you might want to research that issue. The W3C has info and IBM offers a tool to help in achieving compliance.

AWildman

5:11 pm on Jun 23, 2004 (gmt 0)

10+ Year Member



So this may not necessarily be a Win XP SP 2 thing then, huh? Thanks.

AWildman

5:32 pm on Jun 23, 2004 (gmt 0)

10+ Year Member



Okay. Here's something stranger. I went to a site that sets JS cookies, that cookie appeared. The ones on my site appear to be the only ones not working and its odd, cause there's only so much you can do to screw up a cookie!

Here's my code

function set_cart_cookie()
{
var product_number;
var product_generic_name;
var product_specific_name;
var product_price;
var product_quantity;
var lineitem= "";
var counts="";

var today = new Date();
var expires = new Date();
expires.setTime(today.getTime() + 1000*60*60*24*5);
var expiration_date = expires.toGMTString();

for(var i = 0; i < optarray.length; i ++)
{
product_number = optarray[i];
product_generic_name = prodnamearray[i];
product_specific_name = prodarray[i];
product_price = pricearray[i];
product_quantity = quantarray[i];

if(product_number!= null)
{lineitem += product_number + "¦" + product_generic_name + "¦" + product_specific_name + "¦" + product_price + "¦" + product_quantity + "eol";}
}
var liandstate = lineitem + "info" + state_selected+"info"+cart_total;

if((liandstate.indexOf("info info0")) == -1)
{
var cookie_info = "domaininfo=" + escape(liandstate);
cookie_info = cookie_info + ";expires="+expiration_date+ "; path=/; domain= .mydomainname.com;";//
}
else
{cookie_info = "domaininfo=domaininfo" + ";";}
document.cookie = cookie_info;
}

I just don't get it.

Rambo Tribble

5:34 pm on Jun 23, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Actually, a quick test that might establish whether it's a P3P problem is to lower your security setting on IE on the test machine.

AWildman

7:03 pm on Jun 23, 2004 (gmt 0)

10+ Year Member



Okay. Found the issue. It appears that the updated IE doesn't like onunload events which is when I was setting the cookie. Mind you, I haven't done extensive testing, but it appears that this may be a problem.

<update>After more testing, again, not extensive, it appears that events triggered onunload of a page are going to be a problem. It has broken code on several of our sites. Good place to start looking if you find your site is having difficulties in Internet Explorer 6 for Win XP Service Pack 2.</update>

AWildman

7:44 pm on Jun 23, 2004 (gmt 0)

10+ Year Member



[support.microsoft.com...]

Maybe MS's Mac IE people worked on the update seeings how they are no longer working on Mac IE...