Requesting ajax takes a long time to execute

0

I have a ajax request where the method used is POST, the information I pass is with a formData object, it has some photos that can vary from 1 to 15, when I execute this on localhost it does not last 1 second , now that I uploaded the site to the hosting server it takes 120 and stops running, my question is, what could be causing this since the local server runs almost instantly?

$.ajax({
    url: '../controller/inserir_prova_banco.php',
    method: 'POST',
    data: formData,
    processData: false,
    contentType: false,
    success: function(data){}
});
    
asked by anonymous 01.02.2018 / 20:20

1 answer

0

Friend, there are several factors that can cause this.

First, the local server's latency is zero. It will run instantly.

Now when it's a web server, somewhere else .... oh yeah, look what can be a problem to stay so slow.

1- Your internet is extremely lethargic and slow 2- There may be a route problem, from your computer to the server 3- Your web server, may be over loading with many concurrent clients .... 4- Your application is poorly structured etc ...

There are several factors ... but what I believe it to be, is that your server is slow .... if you do not have POST files ... I think it's your very server.

    
01.02.2018 / 22:01