Hello everyone,
Me again. Trying to learn some more :>) I hope I got the terminology
right.
How does a browser parse (correct term?) an HTML document. I'm sure
that every browser does it a little differently. Do they simply just
read a document top-to-bottom and left-to-right and just display
elements in the order in which they encounter them? Or, do they give
priority to certain types of content? For instance, would a browser
display text first, then all the images, then all Javascripts, etc?
Say, for example, I had a large image (let's say 1MB). The image is
floated left of my paragraph, so this is my code:
<img src="image.jpg" style="float: left">
<p> blah blah blah, yadda yadda yadda </p>
Would a browser just load these in order, so I would have to wait for
the 1MB image to load, then I'd see the text?
I ask because there are times I just can't tell. Of couse, a local copy
of a website is always fast - it's on your hard drive. But there are
times I will load the same page over and over again (emptying the cache
in between reloads) and it seems to load in a different order each
time. Sometimes I see text first, sometimes I see images first.
Also, knowing this would also help me optimize pages to load faster.
Thanks to all who reply. I'm really having fun with this and am
enjoying learning. I may even go to a local university to see if there
are any classes available :>)
Viken K.