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.
HubSpot vs WordPress? What best? Indeed, for more than ten years, WordPress has been the…
WordPress Speed Optimization Services for Website maintenance is a full-time job. Apart from introducing new…
Nothing is more terrifying than when your WordPress website is going down, especially when you…
WordPress vs Ghost, who wins actually? Despite its current position as the world's leading content…
The security and safety of any website are essential for its health and well-being. The…
Let's explore the definition of WordPress Website Management Tools before moving on to the finest…