web - Performance costs of multiple <script> blocks in <body> -


working blog landingpage contains large list of posts , 20-30 placeholder-divs ads, each ad-div containing script tag single function call triggers ad-loading.

for example: <script>initializead('ad-1')</script>

the function doesn't take significant amount of time @ all, appends string argument array. actual loading of ads occurs asynchronously later.

now i'm tasked improving initial pageload speed , first-time-to paint, , i'm wondering is: having 30 script blocks in body have negative impact on performance?

i know browser has interrupt html-parsing , start script-evaluation encounters script block. amount of script-blocks in have negative effect? costly browser task switch html parsing script evaluation?

could improve performance moving code single script block @ end of body instead of having multiple script blocks?


Comments

Popular posts from this blog

meteor - inserting data to database gives error "insert failed: Method '/texts/insert' not found" -

angular - DownloadURL return null in below code -