Cookie Bugs

Posted by: Rod Morison 9 years ago


Twice in 2 weeks I've helped a non-dev web user figure out why a particular site was "spazzing out" on them. In one case, a popup menu in the site nav would just "spin". In the other, any click to try to view the shopping cart wouldn't even spin...out to lunch, lights on and no one home...with not a shred of user feedback.

Most devs can guess the frontline symptom: JavaScript exception. In both of these cases, a quick look in the console and stack worked back to some obviously null and undefined vars being accessed wrongly. I pushed back far enough to see that the source of the data in both cases were cookies.

Browser cookies are used in different ways in different server side web stacks, which use them very consistently. I suspect (ok, being charitable here...I know) the design source of the problem is: browser JavaScript that use cookies very, um, flexibly. Say, maybe a JavaScript dev "rolling their own". When some "cookie schema" modification hit, there was no "cookie migration" thought out for users with old cookies. And worse, testers who hit this in devtest...I'll bet they decided it was "their problem" and wiped cookies, then retested.

Well, problem. Most users wouldn't know to delete cookies, and it's a pain to delete all cookies. End users who know to delete just cookies from one url... Ug. Are we software engineers? How much do we really care when we make users feel dumb? (I'm Not being sarcastic. in both cases I helped, the user was sure they "must be an idiot" to even be asking.)

I thought, "Someone in the frontend dev world must be on top of this problem." Googled "cookie versioning" and there was exactly one credible hit. Other googles, like

were humorous at best. (Though, the images for the cookie migration search looked pretty tasty.)

Having debugged other devs JavaScript for years and only started to write much original code recently, I guess I'm shocked...feels like Perl and PHP from 12-15 years ago. I'd better just stop right here.


  • There are currently no comments

New Comment

required (not published)