Closed Thread Icon

Topic awaiting preservation: how does a browser work anyway? Pages that link to <a href="https://ozoneasylum.com/backlink?for=12566" title="Pages that link to Topic awaiting preservation: how does a browser work anyway?" rel="nofollow" >Topic awaiting preservation: how does a browser work anyway?\

 
Author Thread
tunachips
Nervous Wreck (II) Inmate

From: Benton, confused, USA
Insane since: Nov 2002

posted posted 12-31-2002 11:00

I'm wondering how a broswer works, how it goes about displaying a page. We have all seen pages that take forever for the images to load while the text and links are already displayed. For the text and link to be displayed doesn't take much time since the html file is much shaller than a typical image file and the </html> tag is probably read before the first image has even started to be sent or even requested. I know that the browser has to request any image found in the html.

What I have is a php page. my page_1.php calls a class that fopens/freads a css template and fopens/freads a text file and puts them together. All but one of the images are contained in the css template. The text is put in by a str_replace(). Where it is put in is at the very end of the css template before a couple closing div tags and the closing body and html tags.

Nothing is displayed in my browser as it loads until it is all loaded. It didn't work this way before I converted the page to php. When it was a single css/html file, the page would start loading and images would continue to load.

I did have a table in the text div and i took it out with no change. I don't have any ob functions in my php.

What I would like to know, besides why it is doing what it is doing, is this. Does a browser start requesting images before the </html> is read or after?

I really don't mind that it all displays at once. It's just that if a text file is long, the wait for something to show up is long. I would like to find a way to get something showing, like a lowsrc image or some text.

Any answers or suggestions?

Thanks

InI
Paranoid (IV) Mad Scientist

From: Somewhere over the rainbow
Insane since: Mar 2001

posted posted 12-31-2002 11:41

The poster has demanded we remove all his contributions, less he takes legal action.
We have done so.
Now Tyberius Prime expects him to start complaining that we removed his 'free speech' since this message will replace all of his posts, past and future.
Don't follow his example - seek real life help first.

tunachips
Nervous Wreck (II) Inmate

From: Benton, confused, USA
Insane since: Nov 2002

posted posted 12-31-2002 19:15

upon further investigation, i've found that this loading all at once is unique to ie 5.5. I tried it in ns6 and opera7 and it loads images by image. now the question is "why" it does this in ie and not the others?

reitsma
Maniac (V) Mad Scientist

From: the bigger bedroom
Insane since: Oct 2000

posted posted 01-07-2003 05:51

a couple of issues that sprung to mind:

- this is why you specify the image width and height. that way, the browser can reserve that area of screen real estate to the image, and continue rendering the html page.
- one factor could be the number of concurrent connections the browser allows (i forget the actual terminology). that is, if only one connection is allowed, the site must be loaded one request at time, first the html, then the image, then the next image, etc.... or it could have 4 connections, so 4 items can be loaded simultaneously.

- alt tags are also handy. if each image is nicely labelled, then the user can have an idea of what images will eventually arise
- lowsrc images, unless they are incredibly tiny, are a waste of bandwidth - and make the big, real images take longer to load. (IMHO)



also:
- there is no replacement for good old fashioned optimisation. tune your page so that the images are as small as possible, rid your code of redundancies, and do what you can there.

[This message has been edited by reitsma (edited 01-07-2003).]

H][RO
Bipolar (III) Inmate

From: Australia
Insane since: Oct 2002

posted posted 01-07-2003 08:05

You might find it useful posting a link here, so others can check it, my IE6 on my pc does weird stuff that doesnt happen on other pc's =/ so it could always be a prob with your browser, you never know =)

« BackwardsOnwards »

Show Forum Drop Down Menu