html - Does dowloading of javascript block a browser from downloading other resources? -


i reading "high performance web sites", , in chap 6, author writes how downloading scripts blocks other downloads, hence, best practice put scripts @ end of document.

i loaded random page in chrome, , developer tools, see several js downloading in parallel. happening here? has modern browsers evolved, , limitation no longer there? or did miss something?

p.s. still don't quite understand how browser download/parse html/javascript/css when loading page. there blog post/resource explaining general principles?

+++++++edit++++++

quote book:

parallel downloading disabled while script downloading, browser won't start other downloads, on different hostnames. 1 reason behavior script may use document.write alter page content, browser waits make sure page laid out appropriately.

my chrome devtools: my chrome devtools

there 2 separate reasons rearranging loading of resources; actual loading time , apparent loading time.

placing style sheet link means loaded when content of page loads, browser not keep displaying content loads. makes page appear load faster, if total load time still same.

how scripts loaded affect actual loading time because browsers request limited number of resources @ time each host. if browser loading several scripts server, may delay loading of of images. earlier browsers have limit of 2 resources @ time, , although recent versions may load more resources @ time, there still limit.

also, eventhough scripts loaded in parallel, parsing of script blocking. if next script loaded, won't parsed until previous script has completed.

some reosurces:
yahoo! best practices speeding web site
ux movement: why should place style sheets before scripts
google developers: including stylesheets , scripts

edit:

what book says outdated, modern browsers have pre-loaders allows loading of resources before code uses them due parsed.

about pre-loaders:
how browser pre-loader makes pages load faster


Comments

Popular posts from this blog

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -

google shop client API returns 400 bad request error while adding an item -