From my old blog, October 9, 2008. No longer maintained.

Cookies, what I forgot and how I fixed it.

The original is on archive.org.

I don’t do much with cookies and kept making a goof.  YOU MUST ALWAYS SET THE EXPIRY AFTER YOU SET THE VALUE.

I found this article which led me to the answer here.

All old blog posts