Lessons

Unused CSS code

Plug-in code should be connected where it is in demand, and not on every page of the site. An indicator that the plugin is not being used is that more than 90% of its code is not used on the page.

If your site is more than 2 years old, then for sure you have accumulated a large number of unused CSS styles. Modifying the site, programmers forget to delete outdated code. Therefore, it is worth periodically cleaning your CSS files from it.

Also, ready-made website templates contain a wide range of functionality. Usually sites use no more than 50% of it. Therefore, CSS code for unused functions can be removed.

Such cleaning not only speeds up page loading, but also makes your code cleaner. And this speeds up the work of programmers.

Our [free online tool] (/tools/clean-css) automates the cleaning process. But it can be used in other ways. Also, the [full site check] (/full-check) service allows you to get clean files after checking all site pages.

Sample code that is not used:

<html>
    <head>
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <style>
            .btn {
                color: #000;
                display: inline-block;
                margin-bottom: 5px;
                text-decoration: none;
                padding: 5px 10px;
                border: 1px solid #000;
                border-radius: 5px;
            }
            .btn:hover {
                background-color: #ddd;
            }
            /* На странице отсутствует элемент с классом input, следовательно код ниже можно удалить */
            .input {
                background-color: #fff;
                border:1px solid #000;
            }
        </style>
    </head>
    <body>
        <div class="btn">Кнопка</div>
    </body>
</html>

Tariff plans for working with the service

We use cookies. By continuing to use the site, you agree to the processing of personal data in accordance with privacy policy. I agree