I set a cookie in Javascript using the following code:
setCookie('cart_items','product_name'); function setCookie(name,value,days) { if (days) { var date = new Date(); date.setTime(date.getTime()+(days*24*60*60*1000)); var expires = "; expires="+date.toGMTString(); } else var expires = ""; document.cookie = name+"="+value+expires+"; path=/"; }
But the cookie path is not set to root (/) in Chrome. Instead, it is set to the path from which the web page runs!
I tested IE and FF. It works great with both of these browsers ....
What could be wrong with Chrome or is it a problem with the cookie code I am using
In Chrome (16.0.912.63)
Path: / xxxxxxxx / xxxxxxx
in FF (6.0)
Way:/
in IE (9)
Way:/
source share