Disabling Safari AutoFill for a single line address input (2019)
bytes.grubhub.com
bytes.grubhub.com
Case in point: CRM system with address fields for records. Chrome, I don't want to put my freaking address when I'm updating a customer address, nor do I want to save every customer address I add to my browser's address book.
No, you can't. Chrome has disregarded this since at least 2014 [1]. They collected use cases for this in 2016 [2] but did nothing about it [3]
Oh, wait. The author actually writes this further down on the page (emphasis mine): "Up until version 7, Safari used to respect the value of the autocomplete attribute, so setting it to “off” would work. Most modern browsers now choose to ignore the value of autocomplete, so this solution no longer works."
But yeah. Safari's the bad guy.
[1] https://bugs.chromium.org/p/chromium/issues/detail?id=370363
[2] https://bugs.chromium.org/p/chromium/issues/detail?id=587466
[3] https://bugs.chromium.org/p/chromium/issues/detail?id=914451
> A street address. This can be multiple lines of text, and should fully identify the location of the address within its second administrative level (typically a city or town), but should not include the city name, ZIP or postal code, or country name.
Nit: we don't use HTML like it's 2005 anymore. So instead of
<input type="..." />
with bogus XHTML-like slash at the end, just use <input type="...">
Sorry, but it's a pet peeve of mine to point out cargo-cult idioms like that. The slash at the end was there to make your HTML parse as XML/XHTML. But unless you have very specific requirements (like serving your page as XHTML, or fruitlessly attempt to produce or parse your HTML using an XML toolchain) we don't do that anymore, even in 2019. The slash and the pretentious-looking space before it is ignored/error-recovered away by browsers and other HTML parsers anyway.So doing what the linter says is exactly the right answer.
Jokes aside, that space before the / exists as a habit because Internet Explorer couldn't handle tags like <br/>, so in order to have valid XML that worked in IE as well you would do <br />.
Completely pointless nowadays of course, although I do like the / for single elements. It's kind of nice to be able to write HTML5 and XML both with roughly the same syntax.
So, sure, maybe there's a good reason to want XML-compatible syntax. But Netscape 4 users? Let's hope not!
Who is this 'we' you speak of?