Thu Oct. 26

JavaScript Practice

9 – 12h Teaching

Teacher:


Goals

  • I have successfully finished the FroYo Machine Exercise
  • I have successfully solved last weeks exercises

FroYo Machine

Finish the exercise (Solution)

12 - 13.30h Lunch

13.30 – 16h Coaching

Coaches:


The big question: where should I put the <script> tag?

Here's what happens when a browser loads a website with a <script> tag on it:

  1. Fetch the HTML page (e.g. index.html)
  2. Begin parsing the HTML
  3. The parser encounters a <script> tag referencing an external script file.
  4. The browser requests the script file. Meanwhile, the parser blocks and stops parsing the other HTML on your page.
  5. After some time the script is downloaded and subsequently executed.
  6. The parser continues parsing the rest of the HTML document.

Step 4 causes a bad user experience. Your website basically stops loading until you've downloaded all scripts. If there's one thing that users hate it's waiting for a website to load.

Solution: Check out this Stackoverflow thread and find out how you can solve this.

16 – 17.30h Community Meet-Up

Community Meetup

Everybody who is interested to get to know our Powercoders is invited to join!