Reference article:http://www.cnblogs.com/xiaohuochai/p/4859485.htmlhttp://www.cnblogs.com/xiaohuochai/p/4859899.html http://www.cnblogs.com/vajoy/p/4263291.html Defined
Picture delay loading is also known as lazy loading, loading some pictures when loading pictures late or qualifying certain conditions, usually for pages with more pictures. You can reduce the number of requests or delay the number of requests to optimize performance.
Presentation Form
"1" delay load, load delay using settimeout or setinterval, if the user leaves before loading, nature will not load.
The "2" condition loads, meets certain conditions, or triggers certain conditions before the asynchronous load begins.
"3" visual area loading, just load the user can see the area, the main monitoring scroll bar to achieve, generally from the user to see the bottom edge is very close to start loading, so as to ensure that the user pull down when the picture is connected, there will not be too long a pause.
Basic steps
The pictures in the "1" page are set to the same picture
"2" adds the Data-original = "Img/test.jpg" attribute to the picture, saving the real address of the picture
"3" when certain conditions are triggered, the SRC attribute of the picture that automatically changes the area is the real address
Application
"Click the button to display the picture"
<! DOCTYPE html>
"Show picture in Visual area"
<! DOCTYPE html>"Effect Show"
(viewable area loading) picture lazy loading implementation principle