All Collections
Site Audit
CSS file size too large
CSS file size too large

Learn more about the "CSS file size too large" issue in Ahrefs' Site Audit and how to fix it on your website.

Nick Churick avatar
Written by Nick Churick
Updated over a week ago

What triggers this issue?

This issue reports CSS files that are larger than 15, kB.

Why is it important?

Large CSS files can degrade your page load performance.

How to fix it?

1. First off, you should check that the CSS files use HTTP compression. Check the "Compression" column in this report.

The most common compression schemes include gzip and Deflate. HTTP compression can significantly improve transfer speed for large CSS files.

You might need help from your developer to enable HTTP compression for the CSS files.

2. CSS files are often larger than they need to be. You can use a CSS minifier to minify your CSS code.

If your website is relatively small and you don't update it often, you can use an online service for manually minifying your files, such as cssnano or Minify.

Alternatively, you can set up an automated workflow that minifies your CSS before you deploy your updated code. Consider tools like Gulp or Webpack.

Did this answer your question?