The name is rather strange, but I ran into a problem, made a site with ajax requests on a local computer, everything was fine.

That development has come to an end and you need to upload to the hosting, of course, I downloaded, but I saw a little something I didn’t want.

AJAX requests were sent, but you had to wait for an answer ..

I understood that it was terribly inconveniently fell into despair, because the site had been doing for quite a long time, and when it reached the final, it’s like that ..

Perhaps you will advise me and tell me how to overcome it?

Which host to take everything to work fast enough?

    2 answers 2

    The first is that on many sites they give the possibility of testing, and very often free. But you can take the usual ping and test delays. But just test from target sites where your users will be.

    Second, look at the volume of your AJAX. Maybe there are megabytes of data. And it will not be fast. Therefore, open the console in the browser (for example, in chrome - F12 or Ctrl + Shift + J) and:

    • See size and number of requests. Perhaps some queries can be combined into one.
    • See if there are duplicate data. Maybe the same query is executed twice.
    • See if there is any extra AJAX. Perhaps something can be directly inserted into the page.
    • Perhaps some AJAX are static or rarely changed. Cache full! But neat.
    • gzip When properly configured, the browser and web server will do everything for you, transparently compressing the data, and the processor load will be small.
    • VPS fit perfectly, and the code was tested in advance on the local computer, but thanks anyway - M11

    http://ru.hetzner.de/ - there quickly

    • for such a site to take only VPS or server? - M11