Safari and Firefox browser compatibility

This PR isn't *quite* finished - there's still a bit more to be done for Firefox compatibility. OK to start reviewing, but don't merge until I say it's ready...
Fwiw, comments in code with links often go stale (the link sometimes disappears or gets renamed).  One example is with the recent changes to the data model pages on our microsite, all previous links to them no longer work because we changed the link structure.

I say this to say that it is often important to be careful about links in comments.  Either know that it will be a permalink, or also include some text to help explain why it might be there for the case where the link is no more.

Specific to magic numbers like this, introducing a "constant" and giving it a meaningful name is often very helpful.