I\'m using jquery-ui-autocomplete (actually, a catcomplete attached to a search box). It works vey well as long as I use a static-defined a
Try flipping it around, so on page-load you grab it once, then instantiate the autocomplete.
$(function() {
$.ajax({
url: "/path/to/cache.json",
dataType: "json",
data: {term: request.term},
success: function(data) {
var cat_data = $.map(data, function(item) {
return {
label: item.label,
category: item.category,
desc: item.desc
};
});
$("#searchfield").catcomplete({
delay: 0,
source: cat_data,
minlength:0
});
}
});
});