Rafael
February 15, 2014, 7:18pm
1
Hi There,
Is there any way to move the following scripts to the footer??
/assets/js/vendor/modernizr-2.6.2.min.js
http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js
I know that there are some WordPress plugins that insert jQuery in the middle of the page improperly and break things but I’m keeping the plugins to a minimum and want to improve page performance.
Thanks
1 Like
Foxaii
February 15, 2014, 7:34pm
2
They are both registered in lib/scripts.php . If you change the last param of wp_register_script
from false to true, they will load in the footer.
I wouldn’t recommend it though. More so for Modernizr.
dpc
January 12, 2017, 1:15pm
3
hello - did you ever get around this? My client is hell bent on the max score. My scripts are already below the footer so not sure why i’m even getting this issue.
</footer>
<script src="http://s0.wp.com/wp-content/js/devicepx-jetpack.js?ver=201702"></script>
<script src="/sitecontent/wp-content/plugins/wp-retina-2x/js/retina.min.js?ver=2.0.0"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js?ver=2.1.4"></script>
<script src="/wp-content/themes/ampc-sage-85-theme/dist/scripts/main-cc871eaa88.js"></script>
</body>
</html>
ben
January 12, 2017, 3:15pm
4
PageSpeed specifically tells you what files are causing the issue and describes how you can fix them.
Your page has 2 blocking CSS resources. This causes a delay in rendering your page.
Try to defer or asynchronously load blocking resources , or inline the critical portions of those resources directly in the HTML.
As far as your render-blocking JS, those are all 3rd party and not hosted on your site. The same advice applies:
Try to defer or asynchronously load blocking resources
ben
January 12, 2017, 3:17pm
5
Related threads:
Since Google is making a big deal of fast loading sites I thought it would be good to start a discussion around what people are doing with Sage to meet good page speed standards. Some topics to start might be the following which mostly help with eliminating render blocking and improve perceived performance.
Optimum technique to generate inline critical css for either the entire site or on a page by page basis and use conditional statements to determine what critical css to inline based off pa…
https://discourse.roots.io/t/critical-path-css-with-sage-gulpfile/4618
You’re gonna have to put in some work to get the score that you want
1 Like