Cơ sở kiến thức
Semrush Toolkits
SEO
Site Audit
Unminified Javascript and CSS Files

Unminified Javascript and CSS Files

Did Semrush say your site has unminified Javascript and CSS files?

Unminified Javascript and CSS Files image 1

What is minification anyway?

Minification is the process of removing unnecessary lines and spaces in the source code of a page. Basically, minified code is streamlined code. This is important because when code is minified it is easier for servers to load the page quickly and easier for search engines to quickly read the content of the page.

When servers can load pages faster, it makes the user experience much better. Less waiting for pages to load means less people leaving your site in frustration. In turn, this improved engagement can also lead to better search engine rankings over time.

For more information, please see this Google article.

How Semrush checks for unminified files

The Semrush Site Audit checks a website’s sources that are larger than 1KB and looks for source fragments with whitespace symbols. We identify these source fragments and whitespace symbols as “gaps” in the code that should be minified. If these gaps make up more that 10% of the content, it triggers the issue.

Some additional reasons why this check would be triggered on your site include:

  • Comments inside resources
  • Text files inside JS/CSS resources (for example, localization texts)
  • Large amounts of whitespace (“ “) that do nothing in the code and are there for reading purposes only

Please note that our tool is a harsher critic than even Google at this time. We have reported errors even after a webpage passes Google’s page speed test. This is due to the thorough design of our check. If this issue doesn't affect your page load time, simply ignore it.

Minification of Javascript files can be done with the tools listed in this Google support article.

Các câu hỏi thường gặp Hiển thị thêm
Hướng dẫn sử dụng Hiển thị thêm
Quy trình làm việc Hiển thị thêm