By Sean Carney on Thursday, 19 January 2017
Posted in General
Likes 0
Views 237
Votes 0
I am running a pagespeed test at gtmetrics.com that suggests a few things to improve page speed. One of them is to defer parsing of scripts. In particular I have a couple significant ones. One from easysocial and one from easydiscuss.

Could these be deferred. Is this a reasonable suggestion?

Here is the report from gtmetrix:

https://gtmetrix.com/reports/www.drcarney.com/nbW8gsRW

It also suggested turning on browser caching but when I set up EasySocial at starch-smart.com I discovered that was not a good idea because it left people not seeing recently changing content. Do you have any suggestions for this?

The page is at https://www.drcarney.com/

Here is the suggestion about deferring the javascript.

Defer parsing of JavaScript
F (0)
JS High
What's this mean?

1.5MiB of JavaScript is parsed during initial page load. Defer parsing JavaScript to reduce blocking of page rendering.

https://www.drcarney.com/media/com_easysocial/scripts/site-2.0.10.min.js (723.3KiB)
https://www.drcarney.com/media/com_easydiscuss/scripts/site/easydiscuss-basic-4.0.12.js (462.7KiB)
https://www.drcarney.com/media/jui/js/jquery.min.js (87.0KiB)
https://www.drcarney.com/media/system/js/mootools-core.js (74.8KiB)
https://www.drcarney.com/plugins/content/jw_allvideos/jw_allvideos/includes/js/jwplayer/jwplayer.js?v=4.8.0 (71.6KiB)
https://www.drcarney.com/templates/buildr/js/template.php (32.8KiB)
https://staticxx.facebook.com/connect/xd_arbiter/r/qXiJsurHCex.js?version=42 (27.6KiB of inline JavaScript)
https://www.drcarney.com/media/jui/js/bootstrap.min.js (24.7KiB)
https://www.drcarney.com/plugins/content/jw_allvideos/jw_allvideos/includes/js/wmvplayer/wmvplayer.js?v=4.8.0 (15.8KiB)
https://www.drcarney.com/media/jui/js/jquery.autocomplete.min.js (11.7KiB)
https://www.drcarney.com/media/jui/js/jquery-migrate.min.js (7.7KiB)
https://www.drcarney.com/plugins/content/jw_allvideos/jw_allvideos/includes/js/wmvplayer/silverlight.js?v=4.8.0 (6.9KiB)
https://www.drcarney.com/ (6.2KiB of inline JavaScript)
https://www.drcarney.com/plugins/content/jw_allvideos/jw_allvideos/includes/js/quicktimeplayer/ac_quicktime.js?v=4.8.0 (4.8KiB)
https://www.drcarney.com/media/system/js/core.js (4.6KiB)
https://www.drcarney.com/media/foundry/5.0/scripts/bootloader.min.js (3.2KiB)
https://www.drcarney.com/plugins/content/jw_allvideos/jw_allvideos/includes/js/behaviour.js?v=4.8.0 (1.0KiB)
https://www.drcarney.com/media/jui/js/jquery-noconflict.js (20B)
If you have entirely full control of your site then it makes sense to defer your scripts because you could control how the scripts are being rendered but in reality, it wouldn't make sense to defer scripts because you have:

1. A lot of different modules on the site.
2. A lot of different plugins on the site.
3. A different Joomla template
4. A lot of different extensions on your site.

My suggestion:

1. Remove unused modules and plugins (to reduce the initial time to load of pages on your site). You will be surprised that many system plugins although cannot be seen is hogging up your initial load time.
2. Try to implement page speed on the site. It helps in Optimizing images
3. Use a pull cdn like cachefly.com or any other alternative to help you leverage on browser caching especially with images.
·
Thursday, 19 January 2017 23:18
·
0 Likes
·
0 Votes
·
0 Comments
·
Mark,

I will do as you suggest and try to list every plugin and module I am not using and turn them off. I will also try to see if any of the modules I am using are not really needed and turn them off.

I am not aware of Page Speed. Is this a service or a plugin or a module? I know that there is Google testing of pages and GTmetrix etc... but I wonder if you are referring to something that optimize images?

I have set up Amazon CloudFront for CDN and have Regular Labs CND installed. However, I keep having a problem where turning on the CDN somehow causes my css files not to be seen. I may have to put in a ticket with Peter about that one. :-)

Thanks for the suggestions!!!

In particular I was wondering about defering these two since they are the two largest:

https://www.drcarney.com/media/com_easysocial/scripts/site-2.0.10.min.js (723.3KiB)
https://www.drcarney.com/media/com_easydiscuss/scripts/site/easydiscuss-basic-4.0.12.js (462.7KiB)

Sean
·
Friday, 20 January 2017 02:37
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Sean,

I never insist on Cloudflare because of the way their compression works. Very often with a site with so many vendors software installed, 99% of the time it will fail because Cloudflare wasn't designed to handle these kind of sites.

The 2 files that you mentioned are not big. It is only big physically because it isn't gzipped yet. If Cloudaccess supports mod_deflate, you can add this into your htaccess file

AddOutputFilterByType DEFLATE text/text text/html text/plain text/xml text/css application/x-javascript application/javascript text/javascript

It will reduce the file size served by the web server drastically.
·
Friday, 20 January 2017 12:17
·
0 Likes
·
0 Votes
·
0 Comments
·
Awesome. I will ask CloudAccess.net tomorrow if they support mod_deflate.

I also use CloudFront from Amazon and not CloudFlare for my CDN. But, I have it turned off as well as all forms of compression right now as we are trying to figure out another issue in another ticket. :-)

Have you had good experinces with Amazon's CloudFront? I could always set up a CDN with somebody else if you have somebody that works really well with your software.

Thanks, Sean
·
Friday, 20 January 2017 12:25
·
0 Likes
·
0 Votes
·
0 Comments
·
I prefer simple pull cdn services that doesn't do any compressions or alter the contents of your files. Those functionality just adds tons of complexity on what is already complex.

You could try services like:

cachefly.com - Expensive but I guess it always boils down to "You pay for what you get". It has quite a number of POP servers around the world and we use this on our site.

KeyCDN - Much cheaper and you pay for what you use. Interface is much easier compared to cachefly. We use this on all of our demo sites.
·
Friday, 20 January 2017 12:38
·
0 Likes
·
0 Votes
·
0 Comments
·
I will check out both of those CDN services. Thank you for making me aware that some CDN services also add compression and modify files. I certainly don't want to complicate things any more than necessary!

Sean
·
Friday, 20 January 2017 22:02
·
0 Likes
·
0 Votes
·
0 Comments
·
You are most welcome Sean, have a great weekend ahead!
·
Friday, 20 January 2017 23:28
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post