Optimize javascript pre-load of images

后端 未结 5 2202
無奈伤痛
無奈伤痛 2021-02-09 20:19

I was wondering if anyone has any strategies for optimizing the pre-loading of images via javascript?

I\'m porting a Flash application into html/css, attempting to recre

5条回答
  •  星月不相逢
    2021-02-09 20:27

    As you pointed out - one of the most common factors that influences load times for modern web pages are the huge number of small images being sent between the client and server. Some recent studies indicate that for more than 20 images, 80% of your load time is going to be spent in the latency of doing these many gets, not actually doing the downloading!

    A tool called SmartSprites is a very handy way to "compile" a single large image from all of your many little images which will accomplish both much faster load times and the prefetching of images. Here's the link http://smartsprites.osinski.name/

提交回复
热议问题