Re: Query on HTML performance

Anoop Kumar / 2003-06-13 09:07:

> To my understanding HTML document is a sequential doc with text and
> images. Is a way to prioritize any of the text or images with any tags 
> so that that can be displayed at the browser first .
> 
> Now the problem with HTML is if we put a huge gif /data the small size
> data will be delayed to get displayed.The web designer now needs to
> anticipate this and do accordingly. If we can prioritize any data
> segment / picture segment with some special tags then that can get
> displayed first if browser also understands that.

Do you mean that the user agent ("browser") doesn't display text 
content before loading all images, no matter big or small? Or that 
the user agent starts downloading the biggest image before loading 
small ones first and missing all the small images is bad? If it's 
the former, then just get a more intelligent user agent that 
displays alternative content until it has loaded full content - you 
do have reasonable alternative content, don't you?

If it's the latter problem the I'm afraid that a reasonable solution 
would be to add some kind of "delayed" flag to big images. This 
would be used to remove those ugly JavaScript hacks some web 
designers decide to use instead (background downloading with a 
script and later switching the image on screen or something).

I'm thinking something along the lines

<img alt="[A huge illustration about the issue]" src="..." 
delayed="delayed"/>

Where delayed flag would instruct user agent to put this file to 
secondary queue so that more important stuff would be loaded first.

After saying that, I feel that we don't need such a feature because 
it would take quite some time before user agents implemented this 
kind of stuff and a better algorithm for those user agents would be 
to send HEAD request for every linked file, order the results 
according the file size (smallest first) and proceed to download as 
usual. This method doesn't require anything from the page author to 
work and has only minor overhead caused by the HEAD requests. In 
addition, this would for stylesheets and any other kind of external 
linked documents.

-- 
Mikko

Received on Friday, 13 June 2003 04:08:11 UTC