Use a JPG image as the background of the page, the results found that when accessing this page JPG comes out very slowly, how to do?

Source: Internet
Author: User
Keywords Php
Use a JPG image as the background of the page, the results found that when accessing this page JPG comes out very slowly, how to do?

Reply content:

Use a JPG image as the background of the page, the results found that when accessing this page JPG comes out very slowly, how to do?

  1. Image compression

  2. Using CDN

1. Slow speed
2. The large picture of HD has the possibility of dozens of m, the consumption of resources load slow.
3. To do a timer, is to wait for the IMG resources to load the page again, so do not see the process of the picture brush

Simple solution other answers have said, the landlord can refer to the next.
Say two ways to improve the user experience in a slightly more troublesome way:
1, picture block, so you can see the picture of a block of loading out, not to wait for a long time nothing, but also for large map multiple connections download speed can be slightly faster
2, JS asynchronous loading, create a Picture object loading pictures, etc. loaded and then displayed (many examples online)

P.S. Under Server check:
1. Disk I/O
2. Bandwidth
3, can consider vanish
4, static file server cache related to the head set to No, cache time and so on.

P.S.S. Can check the local to server download speed

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.