Save Dynamic CSS/JS as Static Files
When CSS and JS code is loaded by a PHP file, the file is generated dynamically on each page load. This can take a long time and slow down your site.
WP Rocket has an automatically-enabled feature (that means there's no checkbox in the settings for it) to convert those files to static CSS and JS files which will be loaded much faster. A static file is one that only has to be generated once, then can be served directly.
How does it work?
Since these functions occur before caching, this optimization will also be applied when bypassing WP Rocket.
The content of the PHP file(s) will be saved into a static
.css file in the
Does your site use dynamic CSS or JS?
If your site uses these kinds of files, you can identify them in a couple of different ways.
1. In the source code of your page these files will have the
2. You can also identify them in the Network tab of your browser, or in the waterfall chart of a speed testing tool (GT Metrix, Pingdom etc). Look for files with the
.php extension and a content type of either CSS or JS:
If this feature causes a problem on your site you can disable it with the helper plugin found here.