In most cases it is not necessary to have mootools.js framework included in every Joomla! page since this affects performance and can raise conflits when you will try to use next version of mootools framework in one of your components (for example mootools 1.11 and mootools 1.2 are NOT fully compatible). In this case it is useful to remove mootools from Joomla header and add it only when needed.
Go to Extensions->Template Manager in the administration, select the template and click “Edit”, then click “Edit HTML”. Before the closing “</head>” tag add the following strings:
$headerstuff = $this->getHeadData();
$scripts = $headerstuff['scripts'];
foreach ($scripts as $path => $val)
if (strpos($path, 'mootools.js') !== false || strpos($path, 'caption.js') !== false) unset($scripts[$path]);
$headerstuff['scripts'] = $scripts;
<jdoc:include type="head" />
This code will remove all pre-included JS files - for Joomla 1.5 they are mootools.js and caption.js.
Joomla Tip of the day articles.
(c) 2008 ARI Soft. This article or quotations from it may be used only by ARI Soft approbation.