I'm using this lines to remove header scripts of Joomla I don't need it :
$doc = JFactory::getDocument();
$dontInclude = array(
'/media/jui/js/bootstrap.min.js'
);
foreach($doc->_scripts as $key => $script){
if(in_array($key, $dontInclude)){
unset($doc->_scripts[$key]);
}
}
Everything works fine in all pages except those who point to a custom component. There is no override of head in my component and cache is disabled.
I'm using Joomla 3.3.3
Edit: If I print the document object from my component, scripts is an empty array...
Thanks in advance
_scripts
and notscripts
.