Is there a standard page size (data, in bytes) attribute that I can access via JavaScript? -



Is there a standard page size (data, in bytes) attribute that I can access via JavaScript? -

i create accurate page loading bar on website. 1 way load single script page , handle requesting rest of resources via script, measuring bar as:

the number of loaded resources / number of total resource requests

and update bar's width each time new resource finished loading.

this require me re-structure page's code though, , find people here know improve ways of doing things. save myself problem time:

this similar question asked 5 years ago, , i'm unsure if reply still accurate

is there standard built-in page size (data size, in bytes) attribute can access via javascript?

i don't see how knowing current page size help know how big other unloaded elements are. , there's no way know size of other elements on server without asking server.

can you read file size on server using server side language , build loading script dynamically? if other elements don't alter frequently, hardcode sizes or have them set build script.

javascript

Comments

Popular posts from this blog

xslt - DocBook 5 to PDF transform failing with error: "fo:flow" is missing child elements. Required content model: marker* -

mediawiki - How do I insert tables inside infoboxes on Wikia pages? -

Local Service User Logged into Windows -