Just curious why there is a performance enhancement when you standardize a site with the css and js in the headers and at the top/bottom of the page.
Just curious why there is a performance enhancement when you standardize a site with
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
That’s not entirely correct. Said simply:
Style declarations should be as close to the top as possible, since browsers won’t render your page before loading the CSS (to avoid a flash of unstyled content)
Script tags should be as close to the bottom as possible, since they block browsers from parsing after the tag before it is loaded and complete (because the script may change the document with document.write)
If you’re interested in frontend performance, I highly recommend reading High Performance Web Sites: Essential Knowledge for Front-End Engineers by Steve Souders.