yii2-minify-view icon indicating copy to clipboard operation
yii2-minify-view copied to clipboard

Fixing Render Blocking Javascript and CSS in the Above-the-fold content

Open asadkhalili opened this issue 7 years ago • 1 comments

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?

asadkhalili avatar Jan 30 '18 12:01 asadkhalili

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

kwazaro avatar Oct 05 '18 15:10 kwazaro