Optimizations to reduce website loading time

后端 未结 14 1612
感情败类
感情败类 2020-12-07 16:12

What are some important optimizations that can be made to a website to reduce the loading time?

14条回答
  •  眼角桃花
    2020-12-07 16:41

    The first optimisation is: Decide if it is slow, and if not, don't bother.

    This is trickier than it sounds, because it's not like testing a desktop app or game. A game is slow if when you play it on the target hardware, the frame rate is too low. This is very easy to measure.

    A web site is trickier, because you, as the developer, are probably using a local test system with a very fast network. Even when you use your staging / system test servers, you're probably still on the local network. Even your production servers are in all likelihood, on the same continent.

    The same is possibly not true for quite a lot of your users.

    Therefore the options which exist are:

    • Find out by asking your users, whether they find it to be slow
    • Simulate a high latency environment and test it yourself (or your QA team)
    • Guesswork

    The latter is not recommended.

    An option which the holier-than-thou Yahoo Web Sites performance book (which yes, is a book you can buy) doesn't mention a lot is HTTPS. Most web applications which handle important data run mostly or entirely over HTTPS, which changes the rules of the game rather a lot. Remember to do all testing with it enabled.

提交回复
热议问题