English subtitles

← Cameron Analyzes Example 2 - Website Performance Optimization

Get Embed Code
6 Languages

Showing Revision 5 created 05/25/2016 by Udacity Robot.

  1. I decided to do example number two. First off,
  2. we request the page and start receiving the HTML.
  3. We start parsing it immediately and building the DOM.
  4. We come across two style sheets. Style.css and print.css
  5. with a media query for print. We aren't printing,
  6. so print.css isn't a part of the critical rendering
  7. path. We only have to send out a request
  8. for style.css. And then we continue parsing the DOM.
  9. We run into two script tags at the end of
  10. the body. One for app.js and another for analytics.js. analytics.js
  11. is async, so it's not a part of the critical
  12. rendering path. We fire off a request for app.js and
  13. halt building the DOM while we wait for CSS to
  14. arrive and the CSSOM to be built. Now that we
  15. have the CSSOM, the job script engine is unblocked, so
  16. we can run app.js, finish building the DOM and then render
  17. the page. That wasn't to bad.