How to Disable JavaScripts from Your Joomla Site
You have a lot of useless JavaScripts on your site (module, component). How you can disable them? It is very simple and I will tell how to make so in this article.
You just should set all records in scripts array to null. For example:
$doc = JFactory::getDocument();
$doc->_script = array();
$doc->_scripts = array();
Insert this code to a module (or component) you wish to remove JavaScripts in. A little tip: if the module (component) is always on the site, the whole site will no contain JavaScripts.
This trick allows you to disable ALL scripts in the module (component, site). So if you have some necessary scripts and, at the same time, wish to disable some unnecessary ones, you should look for another method.