I am loading the contents of a combo box from XML via JQuery
The XML
has 430 Elements (all these will be part of the drop down list)
I am using JQuery ($.get) to the data and fill the drop down list
It takes ~30 seconds to 1 min to load.
I am wondering if there are any ways to speed up / cache the data
below is my code
<select data-placeholder="Choose Categories..." id="catOptions" class="chosen-select" multiple style="width: 500px;" tabindex="1">
<script language="javascript" type="text/javascript">
$(document).ready(function () {
$.get('<%=ResolveUrl("~/Configuration/Categories.xml")%>', function (d) {
$(d).find('category').each(function () {
var opt = '<option value="' + $(this).text() + '">' + $(this).text() + '</option>';
$("#catOptions").append($(opt)).trigger("chosen:updated");
});
return false;
});
});
</script>
</select>
XML
looks like this
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<categories>
<category>Unassigned/Test</category>
<category>Unassigned/SW</category>
...
</categories>
Data for the XML
is being populated by another application