Hello! I check my site for download speed via google speed test, I can’t fix the following: "Remove the JavaScript and CSS code that blocks the display of the top of the page", namely style.css, c js already figured out - connected the scripts asynchronously, style.css I connect via script

$(document).ready(function() { $("head").append("<link rel='stylesheet' href='css/style.css'>"); }; 

But the test claims that style.css blocks the loading of the top of the page. Tell me what am I doing wrong !?

    1 answer 1

    Alas, Google requires that the first screen of the site be loaded immediately, for example, styles can be registered in the head or connected in a separate file, only for the first screen.

    And he swears, because now you have the styles connected to $(document).ready . blocked until full load