Chapter 7. Summary

Over the course of this book, we’ve outlined the different pieces that make up RWD’s over-downloading performance problem, breaking them down by resource. For images, we’ve described how “Download and Hide” may result in too many image requests, and how “Download and Shrink” may cause downloads of oversized images. For JavaScript, we’ve seen how a hidden script may present reliability issues, and how your CSS structures may cause unecessary downloads. Lastly, we described how an over-large HTML response increases payload and—more importantly—the complexity of the site, making it easier to trigger additional performance traps.

Alongside those issues, we introduced increasingly larger scope solutions. We started from image-specific JavaScript loaders that help download only visible and properly sized images. Such loaders are really a specific implementation of conditional loading, which can also be used to avoid unnecessary JavaScript and CSS downloads. Lastly, we discussed serving device-optimized HTML using RESS or Adaptive Delivery, which can also be used to reference the exact resource files as an alternative to the smart client-side loaders.

All of these techniques boil down to avoiding excess download by either changing the returned HTML (RESS) or changing the resource loader (conditional loading), though implementation details may change from resource to resource.

What to Use When?

The right optimization to use depends on the specific situation. ...

Get Responsive & Fast now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.