AdrianHu99 / NOTES

0 stars 0 forks source link

Replace <img /> elements with <img-2></img-2> to automatically pre-cache images and improve page performance. #5

Closed AdrianHu99 closed 6 years ago

AdrianHu99 commented 6 years ago

https://github.com/RevillWeb/img-2

AdrianHu99 commented 6 years ago

It uses https://developer.mozilla.org/en-US/docs/Web/API/Intersection_Observer_API to to detect when an image is in the users visible viewport, and only load images when they are visible to the user.