Total amount of data required to load a page
Leo Savernik
l.savernik at aon.at
Thu Aug 25 16:41:10 BST 2005
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.
> 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.
However, as soon as one get/post-operation doesn't deliver a content-size
header, you're lost.
mfg
Leo
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <https://mail.kde.org/mailman/private/kfm-devel/attachments/20050825/5d0e6730/attachment.sig>
More information about the kfm-devel
mailing list