As we mentioned earlier, this feature may not benefit sites that support HTTP/2. Aggregate CSS FilesĪutoptimize’s “aggregate CSS files” option will combine all of your CSS files into a single file. When “optimize CSS code” is enabled, Autoptimize will minify your CSS files. If your site only works with “add try-catch wrapping” enabled, we recommend working with a developer to go through your JavaScript files to identify the one causing the issue because excessive use of try-catch blocks can reduce JS performance.Īutoptimize: the free WordPress optimization plugin you didn't know you needed.but that will make your site lightning fast ⚡️This guide explains exactly why you need it □ Click to TweetĬSS Options Autoptimize CSS optimization. This option is useful for debugging issues caused by JS minification and aggregation. Add Try-Catch WrappingĮnabling the “add try-catch wrapping” option will wrap your JavaScript code in try-catch blocks. Excluded JavaScript files will still be minified unless “minify excluded CSS and JS files” is unchecked under “Misc Options”. Note that adding a script to be excluded only affects aggregation by default. By default, Autoptimize excludes the following scripts. This option allows you to exclude specific directories and JavaScript files from aggregation. If you have JavaScript files that need to be loaded in the element, we recommend excluding those scripts from Autoptimize. Forcing JS to load early can result in render-blocking elements that may slow down your page speed. In most cases, we do not recommend forcing JavaScript files to load in your site’s HTML element. Since this option can cause a rapid increase in Autoptimize’s cache size, we recommend keeping this option disabled unless you have a specific reason to enable it. The “also aggregate inline JS” option extracts inline JS in your HTML, and combines it with Autoptimize’s optimized JS file. With that said, aggregating CSS and JS files will still result in a speed bump for certain types of WordPress sites, so we recommend testing your page speed with this option enabled and disabled. At Kinsta, we use modern HTTP/2 servers that support parallel downloads and multiplexing – this means combining files is no longer as important as it used to be because HTTP/2 allows multiple files to be downloaded at the same time. In the past, combining JS and CSS files was a key step in WordPress optimization. Aggregate JS FilesĪutoptimize’s “aggregate JS files” option will combine all of your JavaScript files into a single file. When “optimize JavaScript code” is enabled, Autoptimize will minify your JavaScript files. JavaScript Options JavaScript optimization in Autoptimize. To make things easier, we have compiled the best Autoptimize settings for improving your site’s performance. As with other optimization plugins, digging into Autoptimize’s extensive feature set and settings can be a daunting task. HTML, CSS, and JavaScript is Autoptimize’s bread and butter.
0 Comments
Leave a Reply. |