Viewing Google Website Optimisation

Google Website Optimisation



User: Aaron C. 7 years ago
Hi there

I'm working through website optimisations as recommended by Google here: https://developers.google.com/speed/pagespeed/insights/

One of the recommendations I have received is to "Eliminate render-blocking java script and CSS in above-the-fold content"




Basically I need to move this code from the header field to the footer field, but there doesn't seem to be any way to tell EW where it should put these files.

Best wishes, Aaron

-------------------------------
http://www.tattooremoval.scot
User: Roddy 7 years ago
These scripts are inserted by the EverWeb app so there's nothing you can do about it.

What you can do to speed up the download of the page content seen by vistors is to move these scripts from the Head Code to the Footer Code - especially the Google Analytics. They should always go last in the HTML doc despite what Google says! The Facebook code appears to duplicated.

<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');

ga('create', 'UA-66661745-1', 'auto');
ga('send', 'pageview');

</script>

<!-- Begin Cookie Consent plugin by Silktide - http://silktide.com/cookieconsent -->
<script type="text/java script">
window.cookieconsent_options = {"message":"Highland Tattoo Removal uses cookies on this site to include Facebook, Twitter and Google+ links","dismiss":"Got it!","learnMore":"More info","link":null,"theme":"dark-bottom"};
</script>

<script type="text/java script" src="//s3.amazonaws.com/cc.silktide.com/cookieconsent.latest.min.js"></script>
<!-- End Cookie Consent plugin -->

<!-- Facebook Pixel Code -->
<script>
!function(f,b,e,v,n,t,s){if(f.fbq)return;n=f.fbq=function(){n.callMethod?
n.callMethod.apply(n,arguments):n.queue.push(arguments)};if(!f._fbq)f._fbq=n;
n.push=n;n.loaded=!0;n.version='2.0';n.queue=[];t=b.createElement(e);t.async=!0;
t.src=v;s=b.getElementsByTagName(e)[0];s.parentNode.insertBefore(t,s)}(window,
document,'script','//connect.facebook.net/en_US/fbevents.js');

fbq('init', '1633544523581359');
fbq('track', "PageView");</script>
<noscript><img height="1" width="1" style="display:none"
src="https://www.facebook.com/tr?id=1633544523581359&ev=PageView&noscript=1"
/></noscript>
<!-- End Facebook Pixel Code -->

<!-- Facebook Pixel Code -->
<script>
!function(f,b,e,v,n,t,s){if(f.fbq)return;n=f.fbq=function(){n.callMethod?
n.callMethod.apply(n,arguments):n.queue.push(arguments)};if(!f._fbq)f._fbq=n;
n.push=n;n.loaded=!0;n.version='2.0';n.queue=[];t=b.createElement(e);t.async=!0;
t.src=v;s=b.getElementsByTagName(e)[0];s.parentNode.insertBefore(t,s)}(window,
document,'script','https://connect.facebook.net/en_US/fbevents.js');
fbq('init', '1633544523581359'); // Insert your pixel ID here.
fbq('track', 'PageView');
</script>
<noscript><img height="1" width="1" style="display:none"
src="https://www.facebook.com/tr?id=1633544523581359&ev=PageView&noscript=1"
/></noscript>
<!-- DO NOT MODIFY -->
<!-- End Facebook Pixel Code -->

You can also remove all the comments which are wrapped like this <!-- Comment --> and the spaces and line breaks between the various scripts.

<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-66661745-1', 'auto');
ga('send', 'pageview');
</script><script type="text/java script">
window.cookieconsent_options={"message":"Highland Tattoo Removal uses cookies on this site to include Facebook, Twitter and Google+links","dismiss":"Got it!","learnMore":"More info","link":null,"theme":"dark-bottom"};
</script><script type="text/java script" src="//s3.amazonaws.com/cc.silktide.com/cookieconsent.latest.min.js"></script>
<script>
!function(f,b,e,v,n,t,s){if(f.fbq)return;n=f.fbq=function(){n.callMethod?
n.callMethod.apply(n,arguments):n.queue.push(arguments)};if(!f._fbq)f._fbq=n;
n.push=n;n.loaded=!0;n.version='2.0';n.queue=[];t=b.createElement(e);t.async=!0;
t.src=v;s=b.getElementsByTagName(e)[0];s.parentNode.insertBefore(t,s)}(window,
document,'script','//connect.facebook.net/en_US/fbevents.js');
fbq('init', '1633544523581359');
fbq('track', "PageView");</script><noscript><img height="1" width="1" style="display:none"
src="https://www.facebook.com/tr?id=1633544523581359&ev=PageView&noscript=1"
/></noscript>

-------------------------------
Roddy

Website: http://everwebwidgets.com
Contact: http://everwebwidgets.com/ewWidgets-home/contact.html
NOTE: I am an EverWeb user and NOT affiliated with EverWeb! Any opinions expressed in this forum are my own.
User: Aaron C. 7 years ago
Thanks Roddy, already done that on the mobile site, and deleted a load of old stuff I don't need too - not got around to sorting out the desktop end yet, but that's only 10% or so of my traffic.

Thanks for the advice re the other scripts - that is as I expected. Google giving me a score of 80/100 for the mobile site now so I'm going to deem that good enough and call it a day on this project.

Cheers, A

-------------------------------
http://www.tattooremoval.scot


Post Reply
You must login or signup to post.