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 - load prior to needed, but after critical resources are loaded.
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 variant4 Comments
Sort: