R
R
Rebus2022-04-20 17:41:32
css
Rebus, 2022-04-20 17:41:32

How to hide some site files on Bitrix or all styles from pagespeed?

Google pagespeed swears at multiple css files, asks to remove unused css code

Answer the question

In order to leave comments, you need to log in

3 answer(s)
T
tgarl, 2022-04-20
@roman_vo

I usually ignore this item, since it’s really possible to spend a month on this one item if you take a working project. When you make a project from scratch and you will initially take this moment into account, this is one thing, but shoveling all the styles, and most likely the layout, is another. Of course, if there are no other tasks, you can sit and pick it up and then everything will not work out. Take at least the visual editor and the introduction of styles for managers - here all these styles will be everywhere, and you can’t remove them, but what if they are needed.

S
Sergey, 2022-04-20
@Firsov36

The css code is not necessarily "multiple files". Unused and used code can be in the same file. Google asks to delete the unused one. To do this, you need to analyze the included styles on the page/pages using the browser console (developer tools) and cut out unused code from the styles. Also, unused code can be inline in html code...

Z
zhyeba, 2022-04-20
@zhyeba

$bIndexBot = (isset($_SERVER['HTTP_ACCEPT_LANGUAGE']) && strpos($_SERVER['HTTP_USER_AGENT'], 'Lighthouse') !== false);

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question