utilizzando jQuery Autocomplete, in base ai documenti che dovete fare quanto segue alla cache:jQuery Autocomplete - Il caching non è più un'opzione?
<script>
$(function() {
var cache = {},
lastXhr;
$("#birds").autocomplete({
minLength: 2,
source: function(request, response) {
var term = request.term;
if (term in cache) {
response(cache[ term ]);
return;
}
lastXhr = $.getJSON("search.php", request, function(data, status, xhr) {
cache[ term ] = data;
if (xhr === lastXhr) {
response(data);
}
});
}
});
});
</script>
Non hai usato per essere un'opzione per memorizzare nella cache? Grazie
@DrunkenProgrammer: Grazie per la modifica ':' –