A Joomla 3 system plugin for managing scripts and stylesheets: it removes unneeded JS and CSS, moves them to the page footer, adds async and defer, and minifies and combines files.
JsCssManipulate controls how JavaScript files and stylesheets are loaded on Joomla pages without editing the template code. It helps a site move closer to Google PageSpeed recommendations by removing unnecessary files, deferring scripts and styles and reducing their size. It does not cover every PageSpeed item, but it handles most of the routine work.
Features
- Removal of unneeded JavaScript and CSS files.
- Forced asynchronous (async) or deferred (defer) loading of JS.
- Moving JS and CSS to the end of the page (footer).
- Sort order for scripts moved to the footer.
- Minification and concatenation of JS and CSS.
- Less and Sass compilation.
- Stripping of scripts embedded in the HTML.
- Exclusions for removed files based on request parameters.
Use cases
- An unnecessary script on the site. Enter the file URL in the plugin and tick removal. This is especially useful when jQuery or Bootstrap is loaded twice.
- PageSpeed optimisation. Minified JS and CSS, deferred loading and moving files to the footer shorten the time until content appears.
- Many scripts in the
head. If every script loads before the content, most of them can be deferred so only what is needed loads first.
Exclusion syntax
Exclusions list request (REQUEST) parameters and their values. A parameter and its value are separated by =, parameters by &, and multiple values of one parameter by commas. For example:
option=com_content&view=article,category&catid=1,2,3,4,5
The string is evaluated with AND logic: option is com_content, view is article or category, and catid is one of 1–5.
FAQ
A stylesheet disappeared from the head but did not appear at the bottom of the page. What is wrong?
Turn on the plugin's JsCssManipulate Debug option to see what is output, and temporarily disable minification — this usually shows at which step the file is lost.
Compatibility and requirements
- Joomla 3.
- Extension type: system plugin.