[Suggest] CSS on the footer
-
Hallo Frank!
First of all, thanks for developing this GREAT plugin ??
I want to suggest you a new feature: what about to add an extra option to include the compressed stylesheet in a JS script in the footer?
I just discovered this option in this website and I noticed that this site loads the main CSS on the footer! That’s the code on the front-end:
<script> var cb = function() { var l = document.createElement('link'); l.rel = 'stylesheet'; l.href = 'https://www.vesperhotel.com/wp-content/themes/vesperhotel/css/vesperhotel.min.css'; var h = document.getElementsByTagName('head')[0]; h.parentNode.insertBefore(l, h); }; var raf = requestAnimationFrame || mozRequestAnimationFrame || webkitRequestAnimationFrame || msRequestAnimationFrame; if (raf) raf(cb); else window.addEventListener('load', cb); </script> <noscript> <link rel="stylesheet" href="https://www.vesperhotel.com/wp-content/themes/vesperhotel/css/vesperhotel.min.css" /> </noscript>
It helps to increase the score for Google Pagespeed. Now I’m adding this code by hand on my child themes on the footer.php file. But it will be great to use this feature with AO.
Thanks for hearing!
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘[Suggest] CSS on the footer’ is closed to new replies.