#Asset Loader
asset loader for preloaded (rel=preload) assets.
it's not a polyfill. it's just a small script load assets declared with preload
add css and js assets as per the new w3c draft
<link rel="preload" class="css-preload" href="defer.css" as="stylesheet">
<link rel="preload" class="css-preload" href="https://fonts.googleapis.com/css?family=Material+Icons" as="stylesheet">
<link rel="preload" class="js-preload" href="main.js" as="javascript">
notice js-preload
and css-preload
classes. these classes will be used for finding out which scripts and styles to load.
copy and paste asset_loader.min.js at the bottom of body tag. if you need to support non javascript browsers use <noscript>
tag to add the styles
based on - https://developers.google.com/speed/docs/insights/OptimizeCSSDelivery#example and https://varvy.com/pagespeed/defer-loading-javascript.html
live example - http://www.findyogi.com