search

Home  >  Q&A  >  body text

javascript - Website loads slowly

http://cqwind.chinacloudapp.c... The loading speed of this website is very slow. The large pictures that should be changed have been changed (it is still an old version of the web page). The main problem is the interface. One interface has to receive five messages. Data, these five pieces of data may be in different tables in the database. The response speed of this piece is relatively slow. The front-end solution is to write five ajax receptions for five pieces of data. This may result in faster response speed. I don’t know if this method is feasible. Is there any There is no better solution, mainly because the interface response speed is slow

怪我咯怪我咯2722 days ago883

reply all(4)I'll reply

  • phpcn_u1582

    phpcn_u15822017-06-12 09:27:45

    I don’t think it will be faster to receive five pieces of data with five ajaxes. If the main problem is that the interface returns data slowly, then we should focus on optimizing the database query. However, I opened it and looked at it, and it is not very slow. It only takes 4 seconds to load

    reply
    0
  • 黄舟

    黄舟2017-06-12 09:27:45

    This is very fast. . . The 2M JS file was loaded in 310ms. The interface is slow, maybe it's a server-side problem. For the front end, you can merge js, css, and images into sprites to reduce requests.

    reply
    0
  • 三叔

    三叔2017-06-12 09:27:45

    Go to your backend and ask them why the interface is so slow.

    reply
    0
  • 黄舟

    黄舟2017-06-12 09:27:45

    The idea is to locate the places that affect performance. Common ones are the database, too many http requests, the download file is too large, and your js file is too large. I wonder if there is anything lightweight that can replace it

    reply
    0
  • Cancelreply