https://fullstackopen.com/en/part0/fundamentals_of_web_apps
Really fascinating. I can see, literally as a timeline, the timeline of the requests and responses sent.
And, for each element, I can see what data went into the request - in the header, the body, and what files were part of the response. I can see the HTML that was part of the response!
I notice that images, then CSS came back later. I wonder why.
“In traditional web applications, the browser is "dumb". It only fetches HTML data from the server, and all application logic is on the server. A server can be created using Java Spring , Python Flask or Ruby on Rails to name just a few examples.”
What happens is the browser goes down line by line the HTML file (notes)
and once it gets to the <script> tag it loads the javascript file.
async
attribute - it’ll be fetched in parallel to parsing and executed immediately after (then pausing the HTML parse until it’s done executing?)defer
attribute, then it’ll fetch in parallel but pause executing until the HTML has been parsed.The javascript file essentially determines two things - what happens when someone adds a new note, and loads the rest of the “notes” data content in the HTML page.