From 6c9a1cc3344b54a2e6b1e7f35bb3943be3b4dbd3 Mon Sep 17 00:00:00 2001 From: Katie Kowalsky Date: Mon, 19 Sep 2016 11:29:49 -0700 Subject: [PATCH] update user experience pitfalls --- autocomplete.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/autocomplete.md b/autocomplete.md index df7a3a8..10650af 100644 --- a/autocomplete.md +++ b/autocomplete.md @@ -8,9 +8,9 @@ To build a query with autocomplete, you need an [API key](https://mapzen.com/dev There are two user experience pitfalls to watch out for when implementing a client-side typeahead solution: -**Requests must be throttled.** The client must only send a maximum of six requests per second. Sending requests more often than this will result in a sluggish network and laggy user interface for mobile consumers. A general rule is to account for fast typers by batching their keystrokes and sending the input text no more than six times per second. Mapzen Search limits the amount of requests per second (per API key), so be sure to account for those limits in your throttle code. [Learn more in this interactive demo.](http://jsfiddle.net/missinglink/19e2r2we/) +**Requests must be throttled.** Since autocomplete requests generally correspond directly to user input, it's important to account for fast typers and throttle requests when using the autocomplete endpoint. Mapzen Search has a per second rate limit (that defaults to 6 requests per second), but some devices and networks (for example, mobile phones on a slow connection) may also respond poorly when too many requests are sent too quickly, so be sure to do some testing on your own. [Learn more in this interactive demo.](http://jsfiddle.net/missinglink/19e2r2we/) -**Responses are asynchronous.** This means you cannot be sure responses will be returned in the same order they were requested. If you were to send two queries synchronously, first `'Lo'` then `'London'`, you may find the `'London'` response would arrive before the `'Lo'` response. This will result in a quick flash of `'London'` results followed by the results for `'Lo'`, which can confuse the user. +**Responses are asynchronous.** This means you cannot be sure responses will be returned in the same order they were requested. If you were to send two queries synchronously, first `'Lo'` then `'London'`, you may find the `'London'` response would arrive before the `'Lo'` response. This will result in a quick flash of `'London'` results followed by the results for `'Lo'`, which can confuse the user. ## Global scope, local focus