V
V
Vladislav Dmitruk2018-01-08 00:56:29
Layout
Vladislav Dmitruk, 2018-01-08 00:56:29

How to hide loading css?

Hello.
Please advise how to hide CSS file loading from PageSpeed ​​and make it really asynchronous or postpone it.
Or just how to asynchronously load Bootstrap css ?
Thank you.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Vladislav Dmitruk, 2018-01-08
@webdevlix

Thanks everyone, the solution turned out to be quite a crutch, I glued all the css code into one and placed it in the style tag before the closing body, and got a pagespeed score of 96 / 100.

T
Tom Nolane, 2018-01-08
@tomnolane

i do like this: (in php)

<?php
echo '<style>';
require 'css/bootstrap.min.css';
echo '</style>';
?>

and that is enough. Google Page Speed ​​stops swearing.
upd
for django probably like this:
<style>{% include "/static/css/style.css" %}</style>

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question