My first AJAX request (manual or using jQuery's load, get, post, ajax) takes too much time (50+ seconds). Following AJAX requests becomes normal.
When I troubleshoot the problem using Network section of Chrome and Firefox it showed that it takes almost 51 seconds in waiting (attached is the screenshot). Why is this taking so much time? I am clueless that for which thing the request is waiting for. Here is my code
$(function() {
$('#frmPrd').live('submit', function(event) {
event.preventDefault();
mUrl = "page1.php";
$.ajax({
url: mUrl,
type: 'POST',
data: $("#frmPrd").serialize(),
success: function() {
//Following request is taking 50+ seconds.
$("#dvCart").load("page.php");
},
error: function() {
alert('Error occurred.');
}
});
});
});
The screeshot of Network section
I already have asked the question (following link) but still the issue is not solved. jQuery simple load taking too much time for first call