Chapter 11. Settings Reference

Optimize Files Tab

Whether and how CSS and JavaScript files are optimized, combined and delivered, and how the HTML is minified. The automatic settings on the dashboard set several of these for you.

Optimize CSS and JavaScript files

The main switch for CSS and JavaScript optimization, combining, and how optimized files are delivered.

Enable

The main switch for CSS and JavaScript optimization. Most features need it on.

Combine files

Combines CSS files into one file and JavaScript files into another, split only around excluded files. Rarely faster on today's servers; mostly useful for troubleshooting.

Default: No
Risk: Medium
Smart combine (Bundling) Pro

Combines files into a few well-sized bundles instead of one large file, keeping the order intact. A good choice on servers using HTTP/2 or HTTP/3. Needs Combine files on.

Default: No
Risk: Medium
HTML minification level

How much Minify HTML removes. Basic reduces runs of spaces and keeps comments. Advanced also removes comments and unnecessary spaces around elements and attributes. Ultra also removes redundant attributes and quotes around some attribute values.

Default: Basic
Risk: Medium
Optimized files delivery (WordPress: Combined files delivery)

How the optimized files are served. Static CSS and JavaScript files (the default) works everywhere and is the fastest: your web server sends the files itself. Use Optimize .htaccess to have them compressed. Choose PHP only if static files can't be served on your site.

Joomla On Joomla the other option is PHP, through Joomla: Joomla sends each file, so its address follows your Search Engine Friendly URLs, Use URL Rewriting and Add Suffix to URL settings, and it is compressed when Gzip Page Compression is on (System → Global Configuration → Server). Browsers keep the files for a year, as they do static files.

WordPress On WordPress the other option is PHP, through WordPress: JCH Optimize sends each file as soon as it loads, before your theme and most other plugins, at an address that follows your permalink settings (for example /jch-optimize/asset/…css, or /?jch_asset=… with plain permalinks). The files are compressed when GZip JavaScript and CSS is on. Browsers keep them for a year, as they do static files.

If you used one of the URL rewrite options before, it became the PHP option when you updated.

Default: Static CSS and JavaScript files
Risk: Low

Optimize files automatic settings

Set by the automatic settings on the dashboard; you rarely need to change them by hand.

GZip JavaScript and CSS WordPress

Compresses the optimized files with gzip when Combined files delivery is set to PHP. Leave it off if your server already compresses them. The automatic settings don't change it. On Joomla, Joomla's own Gzip Page Compression compresses the files instead (see Optimized files delivery (WordPress: Combined files delivery)).

Default: No
Risk: Low
Minify HTML

Removes unnecessary spaces and comments from the HTML of your pages.

Default: No
Risk: Low
Include all extensions (WordPress: Include all plugins)

Optimizes files from third-party extensions, plugins and themes too. By default only your platform's own files are included.

Default: No
Risk: Medium
Include PHP and external resource files (WordPress: Include PHP and external files)

Also optimizes files loaded from other websites, and files generated by PHP. Needs the PHP cURL extension or allow_url_fopen.

Default: No
Risk: Medium