Skip to content
Nazmul Nikhil
Menu

Unminified JavaScript and CSS Files (Semrush): Shrink Your Code Files

Semrush flags JS and CSS files that still contain spaces, comments and line breaks. Minifying them makes downloads smaller. Here's how on each platform.

Nazmul Nikhil

By

Head of SEO & Assistant Manager, Digital Marketing at Notionhive

Published 1 min read
Unminified JavaScript and CSS Files (Semrush): Shrink Your Code Files
Photo: Arnold Francisca on Unsplash

In short

Semrush flags "Issues with unminified JavaScript and CSS files" when your site's JS or CSS files still contain whitespace, comments and long names that browsers don't need. Minified files download faster. Turn on minification in your platform or build tool. Files from third parties are outside your control; replace or remove them if they're heavy.

Minifying is one of the easiest speed wins: it changes nothing visible, only file size.

How to fix it

WordPress: caching plugins (LiteSpeed Cache, WP Rocket, Autoptimize, W3 Total Cache) minify CSS and JS. Test the site after turning it on, since some scripts break when combined.

Shopify: theme assets are served compressed by Shopify; flagged files usually come from apps or custom uploads. Minify custom files before uploading.

Webflow: Site settings > Publishing > Advanced publishing options > minify HTML, CSS and JS.

Wix: handled by the platform; flagged files are usually from embedded third-party code.

Custom builds: production builds with Vite, webpack or esbuild minify by default. Make sure the server serves the build output, not source files.

Common mistakes

  • Minifying and never testing. Check forms, menus and sliders after enabling it.

  • Spending time on third-party files you can't change.

This guide isn't affiliated with or endorsed by Semrush.

Sources and references

TAGSSemrush Site AuditSemrush unminified javascript and css filesMinify cssMinify javascript
Nazmul Nikhil

About the author

Nazmul Nikhil

Head of SEO & Assistant Manager, Digital Marketing at Notionhive

SEO and AI search consultant in Dhaka, Bangladesh, helping small and mid-size businesses in the USA, UK, Australia and Canada.

Need help with this?

Get it fixed with Technical SEO

I find the issues that cost you traffic and fix them, starting with the pages that matter most.

Keep reading

Related articles

All Site Audit Issues posts →

Get the next guide in your inbox

One email when a new SEO or AI search guide goes live.

Ready to grow?

Get a free audit of your website, or book a 30-minute call to talk through your goals.

Nazmul Hasan

Talk to Nazmul directly

Reply within 24h

WhatsApp +880 1682835118
nazmulnikhil@gmail.com