Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

I\'m programming a jQuery functionality for doing a search on articles while the

ID: 651897 • Letter: I

Question

I'm programming a jQuery functionality for doing a search on articles while the user is typing in the search field.

I implemented a bind in jQuery that at every keyup, it sets a clearTimeout and a setTimeout to the actual function doing the post to the server. This is because users can be writing something and I want to avoid multiple posts.

I got "stuck" with: from the user interface point of view, what time should I set for the setTimeout? I tried different times (1s, 1.5s, 0.5s) but I have to admit the choice seems kind of random to me.

This raised the broader question: Is there any reference or study that answers the question of what are the "optimal" times for dynamic web interfaces?

I only now noticed that I've used more timers before (e.g. slides), that were also chosen "randomly".

Putting in other terms, does anyone knows how to justify why a given event in web interface has (or should have) a specific delta-time or range of delta-times?

(I'm sorry if this question is not adequate to here, It seemed to me closer than SO.)

Explanation / Answer

If you take the median:

Median = 38 WPM = 228 characters/minute

This gives 3.8 characters per second on average.

So if you waited 0.26 seconds before sending the query you are not querying faster than the speed half of people can type. It all depends on your system and whether it can cope with the amount of requests generated at this rate if it so happens the users of your system are slower than this (if everyone is at this speed then there's no problem).