
February 9, 2015 07:02 by
ben
Today, we will explain to you How to Remove mootools-core.js and caption.js from Joomla. When I form a site I need to evacuate any unneeded outer JavaScript records in the html to help enhance the execution of the site.
So when I make a fundamental substance page utilizing an article design with no modules I am astonished to see these 3 lines
<code>
<script src="/media/system/js/core.js" type="text/javascript"></script>
<script src="/media/system/js/mootools-core.js" type="text/javascript"></script>
<script src="/media/system/js/caption.js" type="text/javascript"></script>
</code>

This happens on both joomla 1.5 and 1.6 When I looked around the web for an answer I continue discovering the response to be utilize standard statement on the last yield to evacuate it. While this will evacuate it, I needed to comprehend why this is included. It ought to in principle just be included when it is required. On the off chance that I include a module that does need mootools then I would prefer not to be uprooting the script document.
It will break the module. Not being a center hack is likely the main fortunate thing about this system. Since Joomla will just add records that are advised to be incorporated, so I chose to work out why they were being advised to be incorporated when nothing on the page needs them.
The Reason
Delving into why, this is the thing that I found: In the com_content part it is calling
<code>
JHtml::_('behavior.caption');
</code>
This one line is bringing on those 3 JavaScript documents to be added to the page It is either a disregarded bug, or evacuating it causes different bugs to be noticeable.
Instructions to alter
You should do nothing more than remark out a line in a center segment com_content. <b>This is a center hack</b> any redesign will return this change and you will need to physically overhaul it. alright on to the fix.
In the file: “/components/com_content/controller.php” find: “public function display($cachable = false, $urlparams = false)” we just comment out:
<code>
JHtml::_('behavior.caption');
</code>
so it will become
<code>
//JHtml::_('behavior.caption');
</code>
Thats it!
Best Joomla Hosting Recommendation
ASPHostPortal.com provides our customers with Plesk Panel, one of the most popular and stable control panels for Windows hosting, as free. You could also see the latest .NET framework, a crazy amount of functionality as well as Large disk space, bandwidth, MSSQL databases and more. All those give people the convenience to build up a powerful site in Windows server. We offers Joomla hosting starts from $1/month only. We also guarantees 30 days money back and guarantee 99.9% uptime. If you need a reliable affordable Joomla Hosting, we should be your best choice.
2e5fb96e-c320-4921-85cb-5e3376e6c5a6|0|.0