I am running into a problem with a cookie I want to access with both JavaScript and CF. I can create the cookie with JavaScript, like so:
document.cookie = 'SAVEDLISTINGS='+newc + ';path=/';
and on the next page CF can see it fine. However, if I use the same JavaScript to update the cookie with a new value, CF will not detect the change on subsequent pages. It retains its original value, as evidenced by the debug output and by dumping the Cookie scope.
JavaScript continues to see the correct cookie value, which I can check using Firefox developer tools. I assume this means the cookie file is being correctly updated. I do not see two cookies with the same name: only one, and it has the value as manipulated by the JavaScript.
I can delete the cookie in JavaScript, using
document.cookie = 'SAVEDLISTINGS=; expires=Thu, 01 Jan 1970 00:00:00 UTC' + ';path=/';
and this will delete the cookie from CF as well (on subsequent pages).
Note that I am not actually using CFCookie to manage the cookie, but I have experimented with setting it blank by ColdFusion (with httponly=no). This doesn't seem to make any difference.