How can a website developer disable autocomplete in forms?

Discuss how to use and promote Web standards with the Mozilla Gecko engine.
JaredM
Posts: 3826
Joined: November 14th, 2004, 4:41 am
Location: Alberta, Canada
Contact:

Post by JaredM »

Good idea!
I'm moving to Theory, everything works there.
Most issues are solved by going through the Standard Diagnostic
Throckmorton
Posts: 10
Joined: July 7th, 2005, 7:07 am

Post by Throckmorton »

Thanks.
User avatar
Nanobot
Posts: 578
Joined: April 28th, 2004, 7:25 pm
Location: California
Contact:

Post by Nanobot »

Throckmorton: Well this forum does have "Standards Evangelism" in the title, and my comment was essentially that. I see these kinds of proprietary HTML elements and attributes as harmful for the Web as a whole, and I'm certainly not alone in this boat. In the example you have given, I would consider the most correct way of fixing it to be changing the form control names to clarify the context.

If an attribute with this function was to be put into the standards, "autocomplete" would be a poor choice of name for some of the same reasons that Google's "nofollow" link type was a poor choice. I would suggest a name that describes a quality of the content, like "private" or "sensitive". But that's off the topic..
old np
Posts: 0
Joined: December 31st, 1969, 5:00 pm

Post by old np »

Nanobot wrote:I see these kinds of proprietary HTML elements and attributes as harmful for the Web as a whole, and I'm certainly not alone in this boat.

Proprietary HTML elements and attributes are like Javascript - only harmful when pages that include them don't have the same or equivalent functionality in browsers that don't support them.
User avatar
Thumper
Posts: 8037
Joined: November 4th, 2002, 5:42 pm
Location: Linlithgow, Scotland
Contact:

Post by Thumper »

np wrote:Proprietary HTML elements and attributes are like Javascript - only harmful when pages that include them don't have the same or equivalent functionality in browsers that don't support them.


So blinquee is okay because you can fake it with js?

- Chris (who isn't getting involved in this, seeing as his bank was one of the biggies for this getting in in the first place)
old np
Posts: 0
Joined: December 31st, 1969, 5:00 pm

Post by old np »

When I said "harmful", I meant "harmful to interoperability". Blinquee isn't harmful to interoperability because the text is still there for browsers that don't support it.

Even standard elements and attributes can be harmful to things like accessibility or usability.
miou
Posts: 7
Joined: July 14th, 2005, 3:05 pm

Post by miou »

Hi guys

I read the topic but I still don't understand how the phpbb issue is solved. Do I need to -somehow- add the tags and codes to some files of the phpbb forum? I guess no, so what is the correct answer?
Throckmorton
Posts: 10
Joined: July 7th, 2005, 7:07 am

Post by Throckmorton »

Nanobot wrote:Throckmorton: Well this forum does have "Standards Evangelism" in the title, and my comment was essentially that. I see these kinds of proprietary HTML elements and attributes as harmful for the Web as a whole, and I'm certainly not alone in this boat. In the example you have given, I would consider the most correct way of fixing it to be changing the form control names to clarify the context.


I am all for standards compliant and semantic code. At the same time, there is a situation I described that FireFox is mishandling. Now, what do you want? A web page that is standards compliant or a web page that works as needed in all browsers?

The standards are there to make the web a more friendly and consistent place for the user base and they do a good job of that. At the same time, the standards are not perfect. When a choice has to be made to be either standards compliant or work properly, then the standards are likely wrong.

Regarding your comment:


Nanobot wrote:I would consider the most correct way of fixing it to be changing the form control names to clarify the context.


The data in question was a Username and a Password. Please don't seriously try to tell me you think field names of "username" and "password" are inappropriate. That's silly, don't you think?

But regardless, this is a technical issue with FireFox, not a standards question. The most correct way of fixing it is by doing something that makes it work as needed. In this case, standards compliance is secondary at best. When FireFox handles data forms correctly, this issue goes away and there is no longer a standards component to debate.
old np
Posts: 0
Joined: December 31st, 1969, 5:00 pm

Post by old np »

Throckmorton wrote:The data in question was a Username and a Password. Please don't seriously try to tell me you think field names of "username" and "password" are inappropriate. That's silly, don't you think?

They are inappropriate because they can mean more than one thing to an administrator - their own username/password or a new user's username/password.
Throckmorton wrote:When FireFox handles data forms correctly

And who determines what's correct?
Throckmorton
Posts: 10
Joined: July 7th, 2005, 7:07 am

Post by Throckmorton »

np wrote:
Throckmorton wrote:The data in question was a Username and a Password. Please don't seriously try to tell me you think field names of "username" and "password" are inappropriate. That's silly, don't you think?

They are inappropriate because they can mean more than one thing to an administrator - their own username/password or a new user's username/password.


No, they're not. The administrator most likely is not the author of the page. The administrator, or other person using the form, will take their clue from the field captions, not the field names. The field names are meaningless to the user of the page. They should never be seen or need to be known. We're talking about a form here.

np wrote:
Throckmorton wrote:When FireFox handles data forms correctly

And who determines what's correct?


The complaints and bug report have already made that determination that something is wrong. I'm not here to debate whether or not something is wrong. I was just hoping to find a fix for it.
dakboy
Posts: 3451
Joined: November 30th, 2002, 12:30 pm

Post by dakboy »

Throckmorton wrote:
np wrote:
Throckmorton wrote:The data in question was a Username and a Password. Please don't seriously try to tell me you think field names of "username" and "password" are inappropriate. That's silly, don't you think?

They are inappropriate because they can mean more than one thing to an administrator - their own username/password or a new user's username/password.


No, they're not. The administrator most likely is not the author of the page. The administrator, or other person using the form, will take their clue from the field captions, not the field names. The field names are meaningless to the user of the page. They should never be seen or need to be known. We're talking about a form here.
The form serves both the user and the user-agent (browser). It has meaning to both. If the fieldnames can be changed to improve functionality on the browser's part, while being transparent to the user (due to the visual captions), that sounds like a good change to me.
old np
Posts: 0
Joined: December 31st, 1969, 5:00 pm

Post by old np »

Throckmorton wrote:No, they're not. The administrator most likely is not the author of the page. The administrator, or other person using the form, will take their clue from the field captions, not the field names. The field names are meaningless to the user of the page. They should never be seen or need to be known. We're talking about a form here.

All browsers that have an autocomplete function take two pieces of data - the server and the field name (not caption, because not all fields have easily discoverable captions, and captions can be different things for the same piece of date). IE, Opera, Netscape, and Firefox all consider "username" at the login page for yourforum.com and "username" at the add user page for yourforum.com to be the same field. This means that phpBB is wrong in naming these fields the same if they mean different things. The autocomplete aspect is just a workaround.
np wrote:The complaints and bug report have already made that determination that something is wrong. I'm not here to debate whether or not something is wrong. I was just hoping to find a fix for it.

To have a fix you need to define desired behaviour. Since there's no standard involving this, we don't have a desired behaviour.
Throckmorton
Posts: 10
Joined: July 7th, 2005, 7:07 am

Post by Throckmorton »

np wrote:
Throckmorton wrote:No, they're not. The administrator most likely is not the author of the page. The administrator, or other person using the form, will take their clue from the field captions, not the field names. The field names are meaningless to the user of the page. They should never be seen or need to be known. We're talking about a form here.

All browsers that have an autocomplete function take two pieces of data - the server and the field name (not caption, because not all fields have easily discoverable captions, and captions can be different things for the same piece of date). IE, Opera, Netscape, and Firefox all consider "username" at the login page for yourforum.com and "username" at the add user page for yourforum.com to be the same field. This means that phpBB is wrong in naming these fields the same if they mean different things. The autocomplete aspect is just a workaround.


We're clearly not on the same page here. You are arguing a point I am not trying to make.

np wrote:
Throckmorton wrote:The complaints and bug report have already made that determination that something is wrong. I'm not here to debate whether or not something is wrong. I was just hoping to find a fix for it.

To have a fix you need to define desired behaviour. Since there's no standard involving this, we don't have a desired behaviour.


Heh, yeah, okay. If you say so. Someone had to spec what's happening now didn't they? Either the behavior is wrong or the specification is wrong. It doesn't matter which is wrong. It only matters that it is wrong.

FireFox is overwriting data that is prepopulated by the server. That is clearly undesirable behavior. It doesn't matter to me if you choose to acknowledge that or not.
User avatar
jqp
Posts: 5070
Joined: November 17th, 2004, 10:56 am
Location: In a box
Contact:

Post by jqp »

np's point is that there is no public standard defining the functionality of "autocomplete". The W3C standards don't cover such a thing. And technically speaking, the "autocomplete" attribute is invalid HTML (not standard), though it has a legitimate purpose and shouldn't probably be supported by IE and others.

I agree, though, that two form fields on the same site shouldn't have the same name but a different function. I make it a practice to add a prefix to all my form field names based on what form they're in:
"mailbag_name", "mailbag_email", would be different from "comment_name", "comment_email"
dakboy
Posts: 3451
Joined: November 30th, 2002, 12:30 pm

Post by dakboy »

Throckmorton wrote:
np wrote:
Throckmorton wrote:The complaints and bug report have already made that determination that something is wrong. I'm not here to debate whether or not something is wrong. I was just hoping to find a fix for it.

To have a fix you need to define desired behaviour. Since there's no standard involving this, we don't have a desired behaviour.


Heh, yeah, okay. If you say so. Someone had to spec what's happening now didn't they? Either the behavior is wrong or the specification is wrong. It doesn't matter which is wrong. It only matters that it is wrong.
Sure, someone spec'd it. Someone in the Mozilla org spec'd it for Gecko. Someone at MS spec'd it for IE. Someone at Opera spec'd it for Opera. Now, they may work similarly in general, but that's a decision made by each vendor so that they aren't surprising the user who switched from a competing product. But no recognized standards-establishing body has spec'd out a standard behavior. Therefore, all three browsers are simultaneously right and wrong. Funny how things can get when one colors outside the lines of defined behaviour - there ceases to be a discrete right and wrong.

FireFox is overwriting data that is prepopulated by the server. That is clearly undesirable behavior. It doesn't matter to me if you choose to acknowledge that or not.
Undesirable for whom? The server doesn't get the final say in how things happen on the client end, the browser does. I don't think the HTML specs require pre-populated values in fields not be manipulated by the user-agent after downloading/rendering the page.
Post Reply