dev-resources.site
for different kinds of informations.
Paying Attention while Loading Lazily
Published at
6/7/2019
Categories
react
lazyloading
performance
serviceworkers
Author
jeffposnick
Author
11 person written this
jeffposnick
open
What's all this?
This is an interactive project that explores what happens when loading best practices (hashed asset URLs, lazy-loading, service workers) meets single page app usage patterns (long-lived tabs, "fake" navigations via the History API) meets common deployment scenarios (redeployments that don't preserve old URLs).
If you're feeling particularly meta, you can watch a video walkthrough of this material:
How's it work?
- Visit one of the loading scenarios below, and leave the page open.
-
In the Glitch editor, make a change to a component
(like
About.js
) -
Using the Glitch console,
run
webpack --config=path/to/webpack.config.js
to rebuild the scenario you have open. - You've just "redeployed!" Navigate around the open scenario page see what works (and what doesn't).
(Updating the web app's JavaScript won't trigger
an automatic rebuild, though updating
server.js
will.)
Loading scenarios to try
- No hashing, no lazy-loading
- No hashing, with lazy-loading
- Hashed asset URLs, with lazy-loading
- Hashed asset URLs, with lazy-loading, and error boundaries
- Hashed asset URLs, with lazy-loading, error boundaries, and service worker precaching
Learn more
Loading JavaScript
- Reduce JavaScript Payloads with Code Splitting
- React's Code Spltting Docs
- React's Error Boundary Docs
Service workers
- Service Workers: an Introduction
- Workbox
- Workbox's Precaching
- The
create-react-app
discussion that inspired this project
HTTP serving
serviceworkers Article's
30 articles in total
Service Workers: Revolutionizing Modern Web Apps
read article
Building Progressive Web Apps in Angular (using pwafire)
read article
Leveraging Service Workers for Advanced Caching Strategies in PWA: A Deep Dive for Beginners
read article
Integrating the Cache API with Service Workers
read article
Service worker weirdness in Chrome
read article
When service workers met framesets
read article
JS Service Workers — An Introduction
read article
Service workers in create-react-app v4+
read article
Offline caching with serviceworkers
read article
Why is an external service via internet, e.g. web-push with GCM needed for service workers to push notifications?
read article
Stop Bundling Scripts for Better Web Performance
read article
Does dev.to ever just hang and not load for you?
read article
Service workers con Workbox 3, tu primera vez
read article
Recreando el Parqués/Parchis en ReactJS - Primera Parte
read article
Recreando el Parqués/Parchis en ReactJS - Segunda Parte
read article
Build a Better Web with Service Workers
read article
Turn your angular application into PWA through service worker
read article
How to Get Videos to Work in Safari With Gatsby and Service Workers
read article
Who's using Service Workers?
read article
My MVP that's PWA and SPA with just wordpress. I'm seeing 0.5s loads, would adding service workers improve performance?
read article
Let Users Know When You Have Updated Your Service Workers in Create React App
read article
Help: Should a new service worker force a refresh to update a PWA?
read article
Going offline with IndexedDB
read article
sw-tools, a library to rule the Service Workers
read article
How to optimize your JavaScript app by using service workers
read article
Progressive Web Apps: Caching Strategies
read article
Paying Attention while Loading Lazily
currently reading
Launching: Push Notifications For Everyone!
read article
What service workers are being used on dev.to and what do they do?
read article
Steam Roulette
read article
Featured ones: