Total amount of data required to load a page
Paulo Moura Guedes
moura at kdewebdev.org
Thu Aug 25 17:22:42 BST 2005
On Thursday, 25 de August de 2005 16:41, Leo Savernik wrote:
> Am Donnerstag, 25. August 2005 01:23 schrieb Paulo Moura Guedes:
> > Hi,
> >
> > It is possible with khtml lib to easily know the total amount of data
> > that a certain web page requires to be loaded, i.e., the document per si
> > plus images, etc?
>
> Though there's a chance for khtml to know the size of the principal
> document, there's no possibility to know the size of the descendant
> elements before they have been parsed and queried.
Yes, but there is no problem with that.
> > That would be interessant for web designers, for example, in order to
> > optimize their load times.
> > I guess KHTMLPart have a way to know that, because of the progress bar it
> > shows when loading a page.
>
> Well, the progress bar is just a hint, and it jumps around wildly as new
> descendants become known. While it is impossible to predict the total size
> of a document at the beginning, you possibly *could* predict the total size
> after you've parsed the principal and all descendants recursively.
There are any specs telling which descendants should be considered?
> However, as soon as one get/post-operation doesn't deliver a content-size
> header, you're lost.
A job signal like "totalSize" wouldn't do it?
Paulo
More information about the kfm-devel
mailing list