Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Progressive Web Application Development by Example

You're reading from   Progressive Web Application Development by Example Develop fast, reliable, and engaging user experiences for the web

Arrow left icon
Product type Paperback
Published in Jul 2018
Publisher Packt
ISBN-13 9781787125421
Length 354 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Chris Love Chris Love
Author Profile Icon Chris Love
Chris Love
Arrow right icon
View More author details
Toc

Table of Contents (12) Chapters Close

Preface 1. Introduction to Progressive Web Apps 2. Creating a Home Screen Experience with a Web Manifest FREE CHAPTER 3. Making Your Website Secure 4. Service Workers – Notification, Synchronization, and Our Podcast App 5. The Service Worker Life Cycle 6. Mastering the Cache API - Managing Web Assets in a Podcast Application 7. Service Worker Caching Patterns 8. Applying Advanced Service Worker Cache Strategies 9. Optimizing for Performance 10. Service Worker Tools 11. Other Books You May Enjoy

Reducing image payload size

Many point to images as being the root cause and to a certain degree they are, but images do not block rendering. Images can and should be optimized, which reduces the overall page size.

Optimizing image file sizes can reduce the overall payload size by an average of 25%. If the page is 1 MB, 25% equals a 250 KB payload reduction.

Responsive images should also be used. This is where you use the srcset image and sizes attributes, or the picture element to reference images that are sized appropriately for the display:

<img srcset="img/pwa-tickets-logo-1158x559.png 1158w, 
     img/pwa-tickets-logo-700x338.png 700w, 
     img/pwa-tickets-logo-570x276.png 570w, 
     img/pwa-tickets-logo-533x258.png 533w, 
     img/pwa-tickets-logo-460x223.png 460w, 
     img/pwa-tickets-logo-320x155.png 320w"  
     src="img/pwa-tickets-logo-1158x559...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €18.99/month. Cancel anytime