Automatic Settings Group

The Automatic Settings in the Combined CSS and javascript files feature configure the options in the Automatic Settings Group automatically.

[Warning]Warning

Do not try to configure the options in the Automatic Settings Group manually unless you know what you are doing. They are only left available because they are useful when troubleshooting an issue. Before submitting for support, ensure you are using the Automatic Settings.

The following table indicate how the Automatic Settings configure the settings in the Automatic Group.

Table 3.1. The Granular options configured by the Automatic Settings

Minimum Intermediate Average Deluxe Premium Optimum
Automatic Basic Settings
Combine CSS Files Yes Yes Yes Yes Yes Yes
Combine Javascript Files Yes Yes Yes Yes Yes Yes
Gzip javascript and css No Yes Yes Yes Yes Yes
Minify CSS No Yes Yes Yes Yes Yes
Minify javascript No Yes Yes Yes Yes Yes
Minify HTML No Yes Yes Yes Yes Yes
Automatic Exclude Settings
Include all extensions No No Yes Yes Yes Yes
Automatic Pro Settings
Replace @imports in CSS Yes Yes Yes Yes Yes Yes
Include PHP and external files Yes Yes Yes Yes Yes Yes
Include inline CSS Yes Yes Yes Yes Yes Yes
Include inline javascript No No No Yes Yes Yes
Position javascript at bottom of page No No No No Yes Yes
Load javascript asynchronously No No No No No Yes

The options in the Automatic Settings Group are detailed below. Normally you don't have to worry about these settings because they are automatically configured by the Automatic Settings. Do not attempt to change these setting manually to configure the plugin. They generally would be in a collapsed section but are still made available because they are useful in troubleshooting an issue.

Automatic Basic Settings

Combine CSS Files

The plugin uses Regular Expressions to identify all the links to css files in the HTML. The contents of all these files will be combined into one file and saved in cache. A link will be generated to access this file and will replace all the previous links to css files.

Combine javascript files

The same procedure as for CSS files above is followed here. All the contents of JavaScript files are combined into one and cached.

Gzip combined files

Selecting this option will compress the aggregated CSS and JavaScript files with Gzip for optimized download. Your server must be configured for gzip otherwise enabling this feature will have no effect.

Minify CSS

This option strips all comments and unnecessary whitespaces such as spaces, tabs, and newlines from the CSS file. This will reduce file size so the website uses less bandwidth for download. Turning this option on will also enable CSS inlined in the HTML in style tags to be minified when the HTML is being minified.

Minify javascript

Same as for the above but with Javascript files.

Minify HTML

The HTML will be minified, ie. unnecessary whitespaces and comments will be stripped to reduce file size. If the Minify CSS and Minify JavaScript options are selected, then any CSS and javascript inlined within declaration blocks on the page will be minified respectively as well.

Automatic Exclude Settings

Include all extensions

By default, all the files from third party extensions will be excluded from the aggregation process. Files loaded from external domains will also be excluded. Only system files and template files are combined. When enabled, all these files will be combined.

Automatic Pro Settings

These settings are only available in the Pro version

Replace @imports in CSS

If this option is set then the plugin will also fetch the contents of any file that is called by an @import statement in the CSS and replace the @import statement with the contents. This effectively eliminates the http request required to fetch the file, optimizing the webpage even more. This will occur recursively so if the contents themselves contains @imports statements, these would also be replaced by contents from the files pointed to by the @import statements.

Include PHP and external files

This options allows the plugin to work with dynamic CSS or javascript provided via php files or files from external domains. This option requires your server to be configured with cURL or have the PHP configuration value 'allow_url_fopen' set to yes.

Include CSS styles

Inline CSS within style declaration blocks will be removed and included in the combined CSS file. This is useful in order to maintain the execution order of the CSS as it occurs on the page if you had CSS links under any style declarations. Additionally it will assist in 'Optimize CSS Delivery' if that option is set.

Include inline javascript

Inline javascript in script declaration blocks will be removed and included in the combined file. Again, this is even more important to maintain the execution order of the scripts on the page as of-times scripts will fall in between javascript links. This makes it more likely for you to be able to move the combined javascript file to the bottom of the page or to use the 'defer' or 'async' attribute to prevent render-blocking by javascript as described by PageSpeed. Inline scripts in the body section of the HTML that contains the document.write function are ignored.

Position javascript at bottom of page

By default the plugin will search the <head> section of the HTML to find CSS/javascript links and declarations to remove and aggregate in a single file. The javascript file would be placed just before the </head> tag. This extends the search to the <body> section of the HTML and then the combined javacript file would be placed just before the </body> tab. This is in another attempt to maintain the execution order of the javascript on the page so it will be more likely to implement techniques to prevent render-blocking.

Load javascript asynchronously

This setting only works when the previous setting is enabled and puts the async attribute to the combined javascript file at the bottom of the page. This directs the browser to load the javascript file asynchronously to prevent render-blocking and speed up the page download. If any files or scripts have been excluded while preserving the original execution order of files on the page then the defer attribute is used instead and only on the last combined javascript file placed at the bottom of the page.