from Hacker News

Lazy Loading Assets

by ultimatedelman on 7/10/14, 5:24 PM with 18 comments

  • by theandrewbailey on 7/10/14, 5:45 PM

    Browsers have optimized for "eager" loading. Link your images, CSS, and JS just like you did when you first learned HTML, then configure your server's caching headers. For JS, there's the async attribute.
  • by dustingetz on 7/10/14, 5:39 PM

    Article presents incorrect information as truth.

    Optimize for cache hits, then no requests happen!

  • by wprl on 7/10/14, 5:35 PM

    Lazy loading leads to more requests, which leads to more latency, slower apps. Better to handle this stuff as a build step with RequireJS or browserify.