Below is the code that inserted in head.php will cause the mootools library will not be attached to website. Of course, the administration panel Joomla! will continue to benefit from Mootools. Only the front of site will be relieved.
<?php
$user =& JFactory::getUser();
if ($user->get('guest') == 1) {
$headerstuff = $this->getHeadData();
$headerstuff['scripts'] = array();
$this->setHeadData($headerstuff); }
?>
<jdoc:include type="head" />
If you want to keep caption.js (some components, modules and plugins use it), you can choose to remove mootools only:
<?php
$headerstuff = $this->getHeadData();
reset($headerstuff['scripts']);
$moo = key($headerstuff['scripts']);
unset($headerstuff['scripts'][$moo]);
$this->setHeadData($headerstuff);
?>
<jdoc:include type="head">
Hope it will help you