Autofill is a good option for users who don't have an account. But it seems that how browsers determine how they'll implement autofill information varies. I'm not surprised of course. In Chrome, it's kept track of by name, class, id values. You must submit an HTML form in the traditional method="post" way (no ajax), and honestly I haven't quite figured out how it works in Safari. Firefox seems pretty straightforward and is probably the most sophisticated. Anyway, enough description of the problem. I wondered, as I received many complaints from users about autofill not autofilling, if I should I should implement some sort of solution of my own using cookies.

  1. A user submits a form.
  2. All the information he uses is collected and stored into a cookie
  3. He comes back to the page and in the first input he types the first letter of his name and if it matches the first letter of his name in the cookie, all the other inputs are filled out automatically.

It works. But maybe *J*oe is on *J*ane's computer. On Joe's first keypress, all of Jane's information is populated into the form because the first letters are the same. This probably confuses Joe and frustrates him substantially.

So the UX question I have is, when Joe starts to type, is it user friendly to instantly give him a javascript confirm box of the sort:

|                                                     |
|       Use previously entered information?           |
|                                                     |
|       Name: Jane Doe                                |
|       Email: [email protected]                     |
|       Account Executive: Bill Bailey                |
|                                                     |
|                                                     |
|                            +--------+  +--------+   |
|                            | Cancel |  |   OK   |   |
|                            +--------+  +--------+   |

(I just felt like doing a little artwork)

Or, since I've never seen anything like this implemented before, is it an unintuitive solution which will startle non tech-savvy users who just know that any sort of box that pops up at them means "danger"?

What's the solution for users who want autofill, but don't create an account. It's a small population of users, so just being like "deal with it, make an account" really isn't an option.

  • What happens if there are several different "profiles" saved?
    – unor
    Jun 8, 2013 at 10:02
  • @unor Currently, it would save the information of the last user to have filled out the form. I suppose it could be amended to save multiple profiles.
    – 1252748
    Jun 10, 2013 at 19:07
  • Interesting problem; I was facing something just like this today. +1 for this ;) Jul 5, 2013 at 2:41

3 Answers 3


I would avoid interrupting someone once they have switched from 'clicking mode' to 'typing mode'.

  • Some people don't touch-type, would keep on typing for some amount of time before noticing the box, and would be rightfully annoyed.
  • Whether you don't touch-type or whether you just touch-type quickly, might you be running the risk of someone with a [c] (for cancel) or an [o] (for OK) in his or her name unintentionally choosing one of those options? That would be an even more extreme annoyance.

If you are going to interrupt, it should be...

  1. Option #1: before anything is typed. ...meaning directly after the user clicks on the first text entry field (or before that if possible). (Yes, that might also lead to 'J'oe loading 'A'nna's info just as easily as 'J'ane's, in your scenario, but that conflict is there regardless.)
  2. Option #2: during some other time when the user is definitely not typing. ...meaning that to use JClaussFTW's suggestion, you would have to disallow using [Tab] or arrow keys to move from the first name field to the last name field (or from the last name field to the next field). Then you can interrupt when you detect a click into that field (i.e. when the user definitely has a hand on the mouse). I think there would be some objection to breaking keyboard field jumping functionality, though.

As already stated in other answers, I would be annoyed to switch back to mouse actions after I started to type; now imagine people who may type looking to the keyboard. They would hate have to retype again because of a dialog window.

Based on this, my best bet for such a problem would be to use some unobstrusive autocomplete feature, much like browsers do in their address bar.

For example: user start typing its name... "J". What's the first stored names with J? Let's suppose it's "Jane". "ane" will appear as a possibility:

Autocomplete input

Now, if the user presses Tab, "Jane" will be autocompleted and his data may be autoloaded by your javascript code. If the user type "o", let's allow him to autocomplete "Joe", "John" or anything else he haves stored in their cookies/localStorage.

If this feel somewhat bad for you/your team, maybe give a look at plugins like jQuery UI Autocomplete, which would allow more options to be shown and arrow navigation.


A few things:

1) Never, ever, ever, under any circumstances use "cancel" where you should use "no". Ever. Did I say never?

2) Skip the box. Wait for Joe to type his first and possibly last name in. That will be sufficient to determine whether or not to autocomplete the rest. If Jane enters her first (and maybe last) name, it will autocomplete her address, phone number, email, etc. In fact, you can use this for several values. If Joe or Jane enters their email, then autocomplete the rest.

3) Keep in mind user privacy and what you really want to be pulling from cookies.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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