Lazily importing feature code on interaction is a pattern used in many contexts. This can be achieved in many ways (defer until interaction, until the browser is idle or using other heuristics) The different ways to load resources are, at a high-level: Eager - load resource right away (the normal way of loading scripts) Preload

•12m read time•From addyosmani.com
Post cover image
Table of contents
"Fake" loading third-party UI with a facadeVideo Player EmbedsAuthenticationChat widgetsOthersHow do you import-on-interaction?ReactVueImport-on-interaction for first-party code as part of progressive loadingTrade-offsReplacing interactive embeds with a static variant
4 Comments

Sort: