[How to] Optimize website loading time using compressed mootools library

Joomla! uses mootols to do a variety of things. If your website or components don't use mootools, then not loading it is a good idea.

However, if your components use it, then there are still some speed optimizations you can do. One of these optimizations is that you can use a compressed version of mootools which is loaded directly from Google. To do it requires very little changes. 

Go to your template, find the following link in your index.php and insert the following code. Essentially this is removing the link which loads mootols from your hosting server, and loads the compressed version directly from Google. That brings the overall size of each web page request by 50Kb. That may not sound like much, but in the overall scheme of things if you are obsessively working on reducing the load time of your website, then this is a very good leap forward.

<?php

$document =&JFactory::getDocument();

unset($document->_scripts[$this->baseurl . '/media/system/js/mootools.js']);

?>

<script type="text/javascript" src="http://www.google.com/jsapi"></script>

<script type="text/javascript">google.load("mootools", "1.1.2");</script>

One more thing...

Do you have friends or a Facebook group who you think would find this useful? Share this with them and then let me know what they think.

Want to supercharge your website?

 
Our website loads FAST ... just 1.29 seconds. We're hosted on FAST InMotion VPS servers We want YOUR website to be fast too, so we've gotten you an exclusive deal - 47% OFF for DART Creations friends + FREE domain! Check it out NOW!