yii2-minify-view
yii2-minify-view copied to clipboard
Fixing Render Blocking Javascript and CSS in the Above-the-fold content
Hi Thanks. I want to solve this problem by putting the following code:
<script type="text/javascript"> function downloadJSAtOnload() { var element = document.createElement("script"); element.src = "defer.js"; document.body.appendChild(element); } if (window.addEventListener) window.addEventListener("load", downloadJSAtOnload, false); else if (window.attachEvent) window.attachEvent("onload", downloadJSAtOnload); else window.onload = downloadJSAtOnload; </script>
How do I get the name of the compressed Js file and put this code in page?
Same problem. Is there any possibility to add smth like cssPosition
property or additional parameters to tag (like "prefetch" or "preload")? Or render minified CSS code directly inside tag? For Google Pagespeed purposes