What is the best practice for debouncing some web forms?
I use debounce in many text fields to delay triggering for some other things whyle user typing.
Normaly I use 300ms for debouncing but sometimes are to short, sometimes to long.
Is there some statistical "best" value for it? Or some speed typing checker to automaticaly decide debouncing time?
Here is example of debouncing:
var debounce;
$('input').on('input change keyup touchstart',function(){
clearTimeout(debounce);
debounce = setTimeout(function(){
/****** DO SOMETHING ******/
},300);
});