A simple usage pattern and lightweight JavaScript library for deferred loading of external CSS and JavaScript resources with optional support for localStorage caching.
This page features two separate bundles of assets (CSS and JavaScript files; one in the <head>
section,
one near the closing <body>
element) that are not loaded / applied until you click the following button
(JavaScript must be enabled!) or activate autoloading of the deferred assets (see below). You should watch the network tab
of your developer tools. In Chrome the blue line roughly indicates the moment when this page is rendered to your screen
(DOMContentLoaded event).
You will see the results here:
onload
attribute, which should print a happy "Loaded first script" to your console as soon as it is activated.