I'm getting XML data via jQuery, but the XML I am using has 5,000+ pieces of data I want to get. When my page tries to get the data after a few seconds my page freezes and shows "This page is being slowed down" and then crashes.
Is there a way I can get the data without the page crashing? Maybe slow the process down so it doesn't handle so many processes at once? Here is the code I'm using to get the XML data:
$(document).ready(function() {
$.ajax({
type: "GET",
url: "mymxl.xml",
dataType: "xml",
success: function(xml) {
$(xml).find("programme").each(function() {
$("xmlcontent").append($(this).find("title").text());
});
},
error: function() {
alert("An error occurred while processing XML file.");
}
});
});