I am trying to understand how CSS is evaluated in a specific setting:
Suppose I have the following content in a tag <head>:
<html><head>
...
<link href="reset.css" type="text/css" rel="stylesheet">
<link href="style.css" type="text/css" rel="stylesheet">
<link href="autocomplete.css" type="text/css" rel="stylesheet">
</head>
<body>
... html ...
<script type="text/javascript" src="/js/script.js"></script>
</body></html>
Now suppose that reset.cssthey style.csscontain some rules that immediately affect the above described addition content or elements in HTML. However, it autocomplete.csscontains only the class used later by some JavaScript.
Now suppose that the browser has already been downloaded reset.cssand style.css, but autocomplete.cssis still waiting. I am wondering what happens if the browser does this when it encounters a script blocking tag at the end of the page? Obviously, it can render HTML before the script tag, but is script execution blocked by the missing one autocomplete.css?
, script .
:
https://developers.google.com/web/fundamentals/performance/critical-rendering-path/analyzing-crp
, JavaScript , CSSOM.
:
1. autocomplete.css? ,
2. javascript script.js , autocomplete.css?
, : script .