When should autocomplete results timeout?
When doing auto-complete/instant search in a text box, you often don't want to fire your lookup event after every keypress, but instead, only X milliseconds after the last keypress. I'm completely down with how to do this and make it work, but I was wondering wh开发者_如何学运维ether there was any proper research or recommendations about what value to use as a timeout? Too slow and it feels sluggish, too fast and it becomes too inefficient.
I know I can just play with the values myself until it feels right, but that'd just make it feel right for me at my typing speed.
Great question, we ran into this recently where I work.
Here are the usual thresholds I see bandied around in UI research:
100 ms:
User notices.
This figure appears to derive from Neilsen, though I can't find anything concrete regarding that in a quick survey. Caveat emptor, I suppose.
1 s:
User begins to get bored.
5-10 s:
User "context-switches."
My recommendation is about 150 ms, enough for them to notice and react if they need to. It also depends on how long your search query is, but we've found this works pretty well. If you run into a source for those figures, or any like them, I'd love to know.
Depends on what kind of input device the user gets to type with. If it's a virtual screen keyboard then you'll want to make it around a second or so. If it's a slide out keyboard then I've found 500-700 ms works pretty well but this was on a palm pre with a tiny slide out keyboard so on a bigger keyboard you could probably get away with a smaller timeout.
There's subjectivity on this particular issue, and that's the reason why the OS and BIOS on most PCs allow you to adjust keyboard delay/repetition time - which IMO is not any different from response times for autocomplete fields. I guess that's a good place to start.
精彩评论