I&#039;m working on this code that uses a JS cookie to figure out what submenus are expanded/collapsed on a JS menu.<BR><BR>I can read and write the cookie just fine on that particular page.<BR><BR>If I surf to another page which I&#039;ve never visited before (within the site and using that cookie of course), the menu reads the cookie just fine and the code acts correctly. If I visit a page that has been visited before, it overwrites the cookie that I set on the page before (onunload) and instead reads that values from the cookie that I originally came there with.<BR><BR>In other words, let&#039;s say I set a cookie with a value of 4 on a page (page1). I got to another page (page2) that reads the cookie and I get 4. I come back to page1 and set the cookie to 152. I go back to page2 and the cookie value is overwritten to 4.<BR><BR>Why? Any ideas?