//_Semicolon;

Will code for food; The ramblings of Talifhani Luvhengo;

Remove Mootools From Joomla 1.5 Website

Sometimes(most times) you don’t need mootools to load, cause well, you don’t need it. Mootools is a javascript library that loads by default on joomla websites but there are times when you don’t want it to load like for example i develop mobile sites, so i dont need mootools to load because it makes loading the sites on a mobile device extremely slow. I think its about 90kb.  And thats well over the “recommend” 20kb limit.

So how do i remove mootools from the header?

Put this code at the top of your template.

 <?php
    $user =& JFactory::getUser();
    //Get the current head data
    $headerstuff = $this->getHeadData();
    //create new empty array for the scripts key, which store all the scripts
    $headerstuff['scripts'] = array();
    //replace into Head Data
    $this->setHeadData($headerstuff);
?>

That should do the trick.

Get Adobe Flash player

Page optimized by WP Minify WordPress Plugin