php/Ajax - Best practice for pre-loading images

前端 未结 4 868
旧时难觅i
旧时难觅i 2021-01-01 06:58

I have put together a script which is very much like the flickr photostream feature. Two thumbnails next to each other, and when you click the next or prev links the next (o

4条回答
  •  暗喜
    暗喜 (楼主)
    2021-01-01 07:22

    In the case where you want to concurrently preload a larger number of resources, a little ajax can solve the problem for you. Just make sure the caching headers are such that the browser will use the resources on the next request. In the following example, I load up to four resources concurrently.

    
    
    
    
    

提交回复
热议问题