Minify css: optimize css delivery

Optimization of web pages is incredibly important component when you create layout a web site. This includes not only code optimizations but optimization of cascading style sheets (CSS), which is overlooked by many webmasters.

As optimization of code, optimized CSS needed for acceleration of loading pages and save bandwidth. Since the CSS file weighs up to 100 KB, many do not understand the importance of optimization, but if you calculate how much time you can save the optimized file in a year, you will realize how underestimated her.

Optimize CSS can be both manually and with the help of special services. Both options have drawbacks. Optimizing tables manually, you can do a lot to overlook, so the optimization will not be as effective as a machine. Furthermore, manual optimization will take you a very long time, since CSS can contain thousands of lines of code. However engine optimization may delete the important text, without which the design will be displayed incorrectly. In this article we give tips for those who want to optimize CSS manually, and for those who are going to do it with the help of online services.

Advice how to minify css

First, be sure to use the generic properties. You can save a few lines if, instead of margin-bottom, margin-left, margin-right and margin-top will use the same margin values as the previous four, for example: body { margin: 10px 2px 10px 5px; }.

Use spaces wisely. Spaces and extra line breaks are generally used to enhance the usability of CSS. However, each character increases the file size. Therefore, if the website design has been completed, nothing prevents you to completely get rid of the extra spaces.

No one doubts the importance of the review. Removing them completely, you will be more difficult to find the right piece of code without Firebug. But do not forget that the lion’s share of the contents of the style file.css they occupy. In order to correct this misunderstanding, it is recommended to use a more concise description. For example, instead of ///* long digression */// you can use memorable /* Logo */.

There are, of course, other ways of optimization, but it is much easier to access the special resources with which you can optimize CSS directly from the browser.

Best choice optimize css

The most exemplary of them was This website offers several options of compression: low, standard, high, higher and private. Standard compression is the most balanced between weight and readability. High and higher is only recommended if you do not make any changes in the future in CSS, because the code will be completely unreadable. Also offers additional options such as grip colors and fonts, sorting, selectors, etc. the Finished result you can get as a text and export to file.

How to change text in css

Among the Russian services good results showed the optimizer CSS on the website Its functionality is almost no different from CleanCSS. With the standard settings, the compression ratio can reach 25%, with a maximum in excess of 30%. Unfortunately, there is no export to a file.

Other services describe does not make sense, as they work in the same way as mentioned above and but they are quite efficient.

Leave a Comment

Your email address will not be published. Required fields are marked *