I made an autocomplete input box of every town, city and village in the UK. Yes, every single one. The load times are painful so is there a way to reduce that?
Here is a sample:
<input type="text" id="location" name="locations" placeholder="Edinburgh, Belfast, Cardiff, London">
$( function() {
var availableTags = [
"Abberton",
"Abbeytown",
"Abbots Bromley",
"Abbots Leigh",
"Abbotsbury",
"Abbotskerswell",
"Abbotsley"
];
$("#location").autocomplete({
source: availableTags
});
});
Here is a JSFiddle with the entire list, which has 7726 items.