MooTools is a JavaScript framework Joomla used from 1.5 through 3.10 for SqueezeBox popups, image captions, and older effects. Joomla 4, Joomla 5, and Joomla 6 do not ship it. Core in those versions uses the Web Asset Manager, Bootstrap 5, and media/system/js/core.js. If a current site still requests mootools-core.js, a template or extension is loading its own copy.
People remove it to cut unused JavaScript and to stop fights with jQuery over the $ symbol. On Joomla 3 that is safe only after you replace captions and modals. Deleting every script tag, which is what a lot of old snippets do, takes jQuery and the template down with it.
What you will learn
- What MooTools was for, in general and inside Joomla
- Which versions still include it, and which do not
- Why caption.js keeps showing up on ordinary article pages
- Why speed plugins and developers want it gone
- How to remove only those files on Joomla 3, and what to do when Joomla 4+ still loads them
What MooTools is
MooTools is an open-source JavaScript library, not a Joomla extension. It gave developers a class system, DOM helpers, events, animation (Fx), and Ajax (Request). The copy Joomla 3 shipped is MooTools Core 1.4.5, plus MooTools More 1.4.0.1 when something asked for the extra effects. Official inventory: Joomla 3 JavaScript frameworks.
The MooTools project itself stalled. Its last release line is 1.6.0 from 2016, and Joomla never moved the CMS copy up to that. You are looking at an unmaintained library frozen inside Joomla 3.
It is not jQuery. Joomla 3 shipped both. jQuery is a separate, optional asset even on Joomla 4 and 5 (jquery in the Web Asset Manager). Removing MooTools does not remove jQuery, and you should not treat them as the same cleanup.
What Joomla used it for
Joomla did not load MooTools on every page by itself. A layout, template, or extension called a behavior, and that behavior added the files. These are the calls that mattered:
| Call | Files it pulled | What you saw on the site |
|---|---|---|
JHtml::_('behavior.framework') |
mootools-core.js. Pass true and it also loads mootools-more.js |
Nothing visible. Later scripts then use $, $$(), and window.addEvent('domready') |
JHtml::_('behavior.caption') |
Core plus caption.js |
Images with class caption get a text line under them, read from the title |
JHtml::_('behavior.modal') |
Core plus modal.js and modal.css |
SqueezeBox. Links with class modal open in a lightbox |
Template or extension addScript |
Whatever path they hardcoded | Sliders, accordions, menus, galleries written against MooTools |
Two details explain the script tags people paste into forum posts.
- caption.js is why MooTools appears on plain articles. Joomla 3 article and blog layouts call
behavior.caption. That loads MooTools even when the page has no popup and no slideshow. Since Joomla 3.2.2 the editor inserts realfigureandfigcaptiontags, but the old script stayed so articles written before that still got captions. - The file is not named
mootools.json Joomla 3. Core ships/media/system/js/mootools-core.jsand/media/system/js/mootools-more.js. The singlemootools.jsname is the Joomla 1.5 file, or a template that copied it. Search formootools, not one exact filename.
Older Joomla also used MooTools for tooltips and form checks. By 3.10 most of those had moved to Bootstrap and jQuery. Modals and captions did not. SqueezeBox was still the modal implementation in 3.10. There is a long core discussion of that leftover: MooTools is still required by modals.
Which versions include it
| Joomla | MooTools in core? | What to do |
|---|---|---|
| 1.5 | Yes. It was the JavaScript framework | Upgrade. Do not spend time micro-optimizing 1.5 |
| 1.6, 1.7, 2.5 | Yes | Same. These releases are long out of support |
| 3.0 to 3.10 | Yes, deprecated. Core 1.4.5 and More 1.4.0.1. Loaded only when a behavior or extension asks | Remove the caller on the frontend after you replace captions and modals. Leave the files on disk |
| 4.0 and later | No. Removed from core, along with caption.js and SqueezeBox |
If the file still loads, it is third-party. Update or replace that extension |
| 5.x and 6.x | No | Same as Joomla 4. Core scripts are core.js and Bootstrap, not MooTools |
Joomla 4’s own break list says caption.js is gone and captions must be figure and figcaption: Potential backward compatibility issues in Joomla 4. Joomla 5 and 6 inherited that. They did not put MooTools back.
A compatibility plugin does not restore it either. Behaviour – Backward Compatibility covers selected PHP APIs. It does not inject mootools-core.js.
Why people want it removed
- Unused weight. On a Joomla 3 article page the caption behavior adds render-blocking scripts in the head. If you have no
img.captionand no SqueezeBox link, the browser still downloads and parses them. - The
$clash. MooTools claims$. Joomla loads jQuery and thenjquery-noconflict.js, which gives$back. Whichever library runs last owns$. A template script that expects jQuery throws “is not a function”. A MooTools slider dies the other way. Removing the library you do not need is one fix. Wrapping jQuery asjQuery(function ($) { ... })is the other, and it is safer when something still needs MooTools. - No upstream fixes. A 2016-era library inside a CMS that stopped at 3.10 will never get a modern browser pass or a security release of its own.
- PageSpeed. Lighthouse flags it as unused JavaScript. The win is real only when the page still works afterward. A broken menu costs more than a few kilobytes.
- Stack conflicts. Bootstrap, Vue, Alpine, and current templates were not written against MooTools 1.4. Old effects CSS also collides with SqueezeBox’s
modal.css. - Migration. Joomla 4 deletes the files. A Joomla 3 site that still needs them is carrying a blocker into the upgrade. Fix the dependency before the hop, not during a failed update. Path and breakage notes: Joomla upgrade issues and Joomla 3 to 4, 5, and 6.
What breaks if you strip it blindly
- Captions on old articles that use
<img class="caption">instead offigcaption - Any
class="modal"link that expected SqueezeBox - Template features written with
Fx.Slide,Fx.Accordion, orTips - Extensions that still call
behavior.framework: older galleries, some menu systems, some editors’ lightbox buttons - The administrator, if your snippet runs there too. Joomla 3 admin modals used SqueezeBox. Never strip MooTools from
/administrator - Inline scripts that still say
SqueezeBox.initialize. The file is gone, the inline code remains, and the console fills with errors
Do not delete media/system/js/mootools-core.js from disk on Joomla 3. Core and extensions still print that URL. You get a 404, not a faster site. Stop the request. Leave the file.
Step 1: Confirm the Joomla version
- Open System → System Information, or look at the footer of the administrator.
- If the version is 4, 5, or 6, skip the Joomla 3 unset snippet. Core is already clean. Go to Step 3 and find the third-party file.
- If the version is 3.10 or older, keep reading. Take a backup before you edit the template. Method: how to backup a Joomla website.
Step 2: See the real script URL
- Turn off any “combine JS” or cache plugin first. Combiners hide
mootools-core.jsinside one bundled file, so view-source lies. - Open a frontend article, view source, and search for
mootoolsandcaption.js. - In the browser Network panel, filter by
mootools. The Initiator column names the document or script that requested it. - Note the path.
/media/system/js/mootools-core.jsmeans Joomla 3 core, pulled in by a behavior./templates/yourtemplate/js/...or/media/com_something/means that template or extension bundles its own copy. Common on Joomla 4+ leftovers.
Step 3: Find the caller
Search the site files (template, then components, modules, plugins, templates) for:
behavior.frameworkbehavior.mootoolsbehavior.captionbehavior.modalmootoolsSqueezeBox
On Joomla 3, a hit inside components/com_content is core calling captions. That one is expected. Hits inside your template and third-party extensions are the ones you can turn off. On Joomla 4+, any hit is third-party. Update that extension, disable it, or replace it. There is no core switch labeled “MooTools”.
Step 4: Replace captions and modals first
- For images, use
figureandfigcaption. The Joomla editor has done this since 3.2.2. Re-save old articles, or run a content replace fromimg.captionto that markup. After the move,caption.jshas nothing to do. - For popups, stop using
class="modal"plus arelattribute. That syntax is SqueezeBox. Use a Bootstrap modal, or on Joomla 4+ the core dialog pattern.behavior.modaldoes not exist on Joomla 4. - Click every slider, tab, and gallery on a staging copy. If one of them dies with
$ is not a functionorFx is not defined, that feature still needs the library. Update the extension before you block the file.
Step 5: Unset only MooTools on the Joomla 3 frontend
The reliable hook is onBeforeCompileHead in a system plugin. It runs after extensions have added scripts and before the head is printed. Code at the top of index.php runs too early, and the usual copy-paste deletes every script, not just MooTools. That broken pattern is called out in the next section.
This version touches MooTools and caption.js only, and it leaves the administrator alone:
<?php
public function onBeforeCompileHead()
{
$app = JFactory::getApplication();
if (!$app->isSite()) {
return;
}
$doc = JFactory::getDocument();
$head = $doc->getHeadData();
if (empty($head['scripts']) || !is_array($head['scripts'])) {
return;
}
foreach ($head['scripts'] as $url => $attrs) {
$path = strtolower($url);
if (strpos($path, 'mootools') !== false || strpos($path, 'caption.js') !== false) {
unset($head['scripts'][$url]);
}
}
$doc->setHeadData($head);
}
?>
Clear Joomla cache and the combiner cache, then view source again. mootools-core.js and caption.js should be gone. jQuery, your template file, and analytics should still be there.
If the console says SqueezeBox is not defined, a layout is still calling behavior.modal. Remove that call. Unsetting the file does not remove the inline startup script.
Step 6: Test the pages that used to need it
- An article with an image caption
- A page that used a lightbox or
class="modal" - The menu, the slider, and the contact form
- One login
- The administrator home screen, media manager, and a modal field such as the article image picker
Check the administrator even if the plugin returns early on admin. A template edit often runs on both sides.
Step 7: On Joomla 4, 5, or 6, update the extension
There is no core file to unset. Use the path from Step 2.
- Template path: switch to Cassiopeia. If MooTools disappears, the template was loading it. Update the template or drop that script include.
- Extension path: update it to a build made for your major, or disable it. Packing MooTools in 2026 means the vendor has not moved that feature to
Joomla.request, Bootstrap, or plain JavaScript. - Do not add the Joomla 3 unset plugin to Joomla 4 and expect it to see Web Asset Manager scripts the same way. Assets registered with
$wa->useScript()are not always sitting in the oldscriptsarray. Disable the asset or remove the include at the source.
The snippet that removes every script
This is the code still circulating, including on older copies of this article. Do not use it:
foreach ($headerstuff['scripts'] as $key => $value) {
unset($headerstuff['scripts'][$key]);
}
The loop has no filter. It drops jQuery, template JavaScript, captchas, and statistics, then the site feels “lighter” because half of it no longer runs. Filter on mootools and caption.js, or do not ship the change.
What to use instead
| Old MooTools piece | Replacement |
|---|---|
behavior.caption and caption.js |
figure and figcaption |
behavior.modal and SqueezeBox |
Bootstrap modal, or the Joomla 4+ dialog field |
window.addEvent('domready', ...) |
document.addEventListener('DOMContentLoaded', ...) or a defer script |
$$('.item') |
document.querySelectorAll('.item') |
Request.HTML |
fetch, or Joomla.request() from core.js on Joomla 4+ |
Fx.Slide / accordion |
CSS, or Bootstrap collapse |
$ as MooTools |
Keep jQuery behind jQuery(function ($) { }) if a script still needs jQuery |
Web Asset Manager is the loader on current Joomla, not JHtml::_('behavior.framework'). A script that only needs Joomla’s helpers depends on core. Add jquery only when that file truly uses jQuery. Docs: Web Asset Manager.
When removing it is the wrong project
If the template, the shop, and two galleries all fatal without MooTools, you do not have a script-tag problem. You have a Joomla 3 stack. Stripping the library will not make that stack current. Plan the upgrade, replace the extensions on staging, then the file disappears because Joomla 4 does not ship it.
Infyways runs those jumps from $149, with a compatibility audit within 12 hours. Start at Joomla Upgrade Services.
Key takeaways
- MooTools powered SqueezeBox,
caption.js, and older effects. It is not jQuery. - Joomla 3.10 still ships Core 1.4.5. Joomla 4, 5, and 6 do not ship it at all.
- Article layouts load
caption.js, which is why the file shows up on pages that look static. - Unset only URLs that contain
mootoolsorcaption.js, on the frontend, after captions and modals have a replacement. - Never delete the core file on Joomla 3, and never unset every script in the head.
- On a current site, update the template or extension that is still bundling the library.
Frequently asked questions
What is MooTools used for in Joomla?
On Joomla 3 it opens SqueezeBox modals and builds captions for images that use the caption class. Older templates also use it for sliders and accordions. Joomla 4 and newer core do not use it.
Does the latest Joomla still use MooTools?
No. Joomla 4 removed it, and Joomla 5 and 6 did not bring it back. A request for mootools-core.js on those versions comes from a template or extension.
Why do people remove MooTools?
The usual reasons are unused JavaScript on article pages, conflicts with jQuery over $, and the fact that the library has had no real release since 2016. PageSpeed scores are a side effect, not the only reason.
Why are mootools-core.js and caption.js on every article?
Joomla 3 content layouts call JHtml::_('behavior.caption'). That behavior loads both files so old img.caption markup still gets a caption.
Will my site break if I remove it?
It breaks wherever a template or extension still calls SqueezeBox, caption.js, or MooTools effects. Test those pages. The administrator on Joomla 3 should keep the library.
Should I delete mootools-core.js over FTP?
No. On Joomla 3 that only creates a 404, because core still prints the URL. Stop the behavior or unset that URL. On Joomla 4+ the file is not part of core.
Is MooTools the same as jQuery?
No. Joomla 3 loaded both. jQuery remains an optional Web Asset Manager asset on current Joomla. MooTools does not.
What replaces caption.js and SqueezeBox?
Use figure and figcaption for captions. Use a Bootstrap modal, or the Joomla 4 dialog, instead of class="modal".
Can someone remove it without breaking the template?
Yes. That means finding the caller, replacing captions and lightboxes, then unsetting only those scripts. Request a Joomla upgrade audit if the template still depends on it.
