Categories: Joomla

Remove Mootools in Joomla

Removing Mootools.js and caption.js can help to reduce the page load time of your website, especially if your website has a lot of JavaScript files or if the website is loading slowly due to a slow internet connection. Additionally, removing these libraries can help to avoid conflicts with other modules or extensions that may rely on different JavaScript libraries or versions.

However, it’s important to note that removing Mootools.js and caption.js from the frontend of your website may cause some parts of the website to stop working properly if they rely on these libraries. Therefore, it’s important to test the website thoroughly after removing these libraries to ensure that everything is working as expected.

These are the two lines which load in the joomla website.

<script type="text/javascript" src="/media/system/js/mootools.js"></script>
<script type="text/javascript" src="/media/system/js/caption.js"></script>

So to disable the two lines of code we need to write the following code on the top of the index.php file of our template.

 <?php
//remove mootools.js and caption.js
$headerstuff=$this->getHeadData();
reset($headerstuff['scripts']);
foreach($headerstuff['scripts'] as $key=>$value)
{ unset($headerstuff['scripts'][$key]); }
$this->setHeadData($headerstuff);
?>

After inserting the lines of codes, refresh the frontend and clear the joomla cache.If you have problems with mootools on your Joomla website, ask us for assistance.

Abhilash Sahoo

Abhilash Sahoo, with 14 years of experience, is a Certified Joomla and WordPress Expert and the Founder & CEO of Infyways Solutions, specializing in innovative web development solutions.

Share
Published by
Abhilash Sahoo

Recent Posts

HubSpot vs WordPress: A Comparison Overview of Popular CMSs.

HubSpot vs WordPress? What best? Indeed, for more than ten years, WordPress has been the…

3 months ago

Boost Your Website’s Performance with Expert WordPress Speed Optimization Services

WordPress Speed Optimization Services for Website maintenance is a full-time job. Apart from introducing new…

3 months ago

Fixing There Has Been A Critical Error On This Website WordPress

Nothing is more terrifying than when your WordPress website is going down, especially when you…

4 months ago

WordPress vs Ghost: Exploring the Differences!

WordPress vs Ghost, who wins actually? Despite its current position as the world's leading content…

4 months ago

Top WordPress Security Services Providers in 2023

The security and safety of any website are essential for its health and well-being. The…

4 months ago

Top 12 WordPress Website Management Tools for 2023

Let's explore the definition of WordPress Website Management Tools before moving on to the finest…

6 months ago