Close

Cookie monster

A project log for Motivation

Run this each day for 30 days for motivation to finish your projects.

Peter WalshPeter Walsh 07/19/2021 at 22:500 Comments

Just spent all day sorting out cookies and local storage.

You would *think* that if I have a local html file, the browser would let me store a local cookie.

Nope. Cookies only work for remote files. Feature was removed from Chrome, and Firefox will only allow it for the current invocation; meaning, even if you allow local files to set cookies, restarting firefox will cause it to ignore that setting. Even though the setting appears in the exceptions list. WTF?

Fortunately there's an alternative called "web storage" that mostly works in all browsers, although the default behaviour is different for different browsers, but Firefox seems to like the exception across restarts so it's a manageable problem.

But... yuck. Four hours wasted figuring out ridiculous browser differences. One of which is almost certainly a bug in Firefox.

I have no idea how IE will handle this. Hope it works.

Discussions