

Check out the Minify and compress network payloads guide to learn more about tools to minify JS, and some complementary techniques, like compression.SELECT t1.TagName AS, t2.TagName AS, COUNT(pt1.PostId) AS Minification can also be applied to other types of files. In this guide, we've covered CSS Minification with webpack, but the same approach can be followed with other build tools, like gulp-clean-css for Gulp, or grunt-contrib-cssmin for Grunt. Since CSS files are render-blocking resources, if you apply minification on sites that use large CSS files, you can see improvements on metrics like First Contentful Paint. The report doesn't show "Minify CSS" as "Opportunity" anymore, and has now moved to "Passed Audits" section:

Click on Performance and find the Opportunities section.Both files are much smaller, in particular, the animate.css has been reduced in ~26%, saving ~20KB! You can inspect these files, and see that the new versions don't contain any whitespaces. Select the Disable cache checkbox if it isn't already.Press `Control+Shift+J` (or `Command+Option+J` on Mac) to open DevTools.

To inspect the size and content of the files: If you got lost in any previous step, you can click here, to open an optimized version of the site. Next, you'll check the result of this optimization with performance tools. This is how the resulting will look like: Take a look at the following CSS block: body ) ,Īfter making the changes a rebuild of the project will be triggered. In production, these characters can be safely removed, to reduce file size without affecting how the browser processes the styles. CSS files can contain unnecessary characters, such as comments, whitespaces, and indentation.
