|
|
|
|
|
by andrewbarba
3576 days ago
|
|
One of the best use cases is lazy loading expensive data until the div is visible. Image loading, or even fetching a resource. You essentially get this for free in native apps (iOS/Android with recycled views) but there hasn't been a great way to accomplish this on the web. Note: this is definitely not the same as a recycled view. But can help accomplish one aspect |
|
Echo.js (https://github.com/toddmotto/echo) is another small no-dependency library (1.89 KB minified), which detects elements appearing on screen, and goes a step further to swap the "src" attribute with a placeholder for lazy loading and unloading.
Disclosure: I've submitted a pull request to it.