Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

What is the point of the autocomplete attribute? Isn't it bad practice to tell your users how their browser should work to fill a form?

share|improve this question

2 Answers 2

up vote 3 down vote accepted

There are cases where you could conceivably want to force the user to manually enter data:

  • A domain registrar might apply this to the domain field to ensure accuracy and avoid the auto-filling of previous attempts.
  • If an application might be used in a fairly public setting like a shared kiosk, you might want to prevent a form from giving hints as to who's used it previously.
  • The app provides its own auto-completion.
  • E-mail/confirmation fields.
  • The spec gives some other examples.

Isn't it bad practice to tell your users how their browser should work to fill a form? […] I was thinking about the whole "don't open links in new windows, let the user decide"

Don't confuse bad practice with judgement call, even if that call tends to lean heavily toward "Don't."
Yes, it's generally accepted that you shouldn't open links in new windows, but that was more a retaliation against a time when many sites would open nearly all links–or at least off-site ones–in new windows. As with most tools, even disliked ones, there are cases where it's useful and you need to decide if the technique applies to your situation.

share|improve this answer
1  
This is false. "most have a no-refund policy if you mis-type the domain" ICANN requires all domain registar's give users 5 days to cancel registrations with full refund. icann.org/en/resources/registries/agp/agp-policy-17dec08-en.htm –  citadelgrad Aug 27 '12 at 21:34
    
Odd. I remember running into that all the time(though never had it actually be a problem for me), and assumed it still fairly standard. Either way, it's irrelevant to the actual question. –  Su' Aug 27 '12 at 23:33
1  
Yes it is irrelevant but it is our duty to not spread false information. –  citadelgrad Aug 28 '12 at 2:03
    
…which would be why I removed it. You could've made the edit yourself, by the way. (I think your current rep allows, though it'd be queued for approval, but still.) –  Su' Aug 28 '12 at 4:13

From the w3schools site you linked:

"Tip: It is possible to have autocomplete "on" for the form, and "off" for specific input fields, or vice versa."

This could be so that only certain fields are autocompleted, rather than the browser attempting to fill in ALL of the fields. It would also only work if the browser has autocomplete enabled.

"Isn't it bad practice to tell your users how their tool should work to fill a form ?" Can you please clarify this? What is Their tool ?

share|improve this answer
    
I was thinking about the whole "don't open links in new windows, let the user decide" –  Manu Aug 27 '12 at 18:35

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.