What do "minify" and "combine" mean?
Minification is the process of removing white space and comments from code. This makes the file size smaller, therefore faster to download. Minification alone does not reduce the number of HTTP requests on your site.
How WP Rocket does it
- WP Rocket searches the HTML of the page and discovers links to
.jsfiles and inline scripts in
- The files are processed and the optimized versions are stored in:
- If you use WordPress multisite, the folder named /1/ will change to reflect the site number.
- Minified files contain a query string (
?ver=) with the last modified timestamp, for cache busting purposes
- Combined files use a random string in the filename each time it's regenerated, for cache busting purposes:
- If only Minify is enabled inline scripts won't be minified, just .js files will be minified.
- If Minify and Combine are enabled, then inline scripts will be extracted from the HTML, moved to the combined file and minified in the combined file.
- If Combine is enabled, the combined file is inserted into the page just before the closing
bodytag, so it won't be render-blocking.
- This optimization is only applied on cached or optimized pages.
Some scripts are automatically excluded
These files will not be processed:
- Filenames containing
.min- they are already minified. Note that 3rd party files with
.minin the filename will still be hosted locally, but not further minified.
- We have some automatic exclusions for plugin and theme compatibilities
- Localized scripts are excluded
- Excluded inline scripts
- Excluded external files