Hi All,
I have a web page.On load of the page, i am performing 4 ajax calls for the service through JQuery .All are asynchronous calls.
The time taken varies for different browser .
Services Chrome FireFox
1 536?ms 1229ms
2 834?m 2300ms
3 971?ms 2800ms
4 10006?ms 3000ms
All the four Ajax calls mentioned above have js code dependent The result fetched from the data are used for binding the values to controls.
Please let me know how can i improve the performance of the page
function ReconcileContracts() {
$.ajax({
type: "GET",
url: '/' + ResolveUrl("/services/Contract/CompanyContractMetadata") + '?ContentID=' + PageSettings.ContentID,
async: "false",
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function (result) {
if (result != undefined && result != 'undefined' && result.length > 0) {
if (result === "All") {
$('._checkAllContracts :checkbox').prop('checked', true);
$('#contractSelector').hide();
}
else {
var ready = false;
while (!ready) {
if (totalContracts >= $("#contractsLeft option").length) {
SetSelectedContracts(result);
ready = true;
}
}
}
}
}
});
}