Sometimes, code smell comes from your documentation:

In some case, the browser will keep suggesting autocompletion values even if the autocomplete attribute is set to off. This unexpected behavior can be quite puzzling for developers. The trick to really force the no-completion is to assign a random string to the attribute like so:

autocomplete="nope"

Since this random value is not a valid one, the browser will give up.

Giving invalid data until "the browser will give up" is a best practice, is it? Whew, that smells. I love the, "The trick is to really force" line. "Really force"?

"Hey, Firefox, remember when I told you to turn off autocomplete? It's just an informal request. If I want you to really honor it, I'll really force you to."

/sigh

Protip for Mozilla: Firefox form autocomplete is broken. I don't really care if it follows standards; most users and nearly every web developer will tell you its behavior is broken.

I hate to see [sic] it, but it looks like Firefox usage may be down over 12% over 2015. It was my favorite browser to use for dev and home. I think the trend is pretty clear: There are now only three browsers. Edge/IE on Windows, Safari on iOS (and OS X, if you count it), and Chrome.

Labels: ,