<head>
<script src="/some/path/to/js"></script>
<link href="/some/path/to/css">
</head>
When we have one <script>
tag (for js file) in the <head>
tag before a <link>
tag (for css file). Which file would be requested first by the browser?
- Would it make the request for both css and js file simultaneously?
- Would it first wait for the js file to get downloaded before making the request for the css file?
- Or, would it download the css first, render the page with complete HTML and CSS and then making the request for the js file thereafter?
Describe the page rendering process in a browser? This post doesn't explain the blocking nature of js files and how it affects HTML rendering/parsing.