Cara Menemukan Gaya CSS yang Tidak Digunakan di Stylesheet Anda


Even though your stylesheets are cached, the first time someone visits your site a bloated CSS file can really slow your site down. This isn’t too great for a first impression. As sites grow, they tend to expand with new widgets and objects that designers continue to fine-tune with more and more stylesheet options. Over time, your stylesheet can get quite bloated and be a key part of mengapa situs Anda mengunduh lebih lambat daripada yang lain.

I’ve seen other CSS verification tools out on the web. We’ve used CSS bersih to reduce the file size by better organizing and minifying the data on it. When you’re using a third party to analyze your site, you have to be careful, though. If they scrape one page and analyze your CSS, the tool may have you remove reduce tons of styles that are utilized on other pages.

Tidak demikian halnya dengan CSS yang tidak digunakan - alat itu Andrew Baldock dari Mindjet, a pemetaan pikiran application, showed me yesterday. The tool crawls your site and identifies unused CSS. You can even check styles you want to keep regardless of the analysis. To top it off, you can download the stylesheet after it’s run through a minify routine.

css yang tidak terpakai

Di atas adalah tempat dashboard CSS yang tidak digunakan found that it could reduce my stylesheet by 56%. We’re going to continue to test out the tool – I’m still concerned about objects we’re pulling in via Javascript and Ajax. However, it’s looking like a great resource for us.

2 Komentar

  1. 1
  2. 2

Bagaimana menurut Anda?

Situs ini menggunakan Akismet untuk mengurangi spam. Pelajari bagaimana data komentar Anda diproses.