Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 797531
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T22:49:16+00:00 2026-05-14T22:49:16+00:00

I’m writing a download manager, and I’ve noticed that all the web pages I’ve

  • 0

I’m writing a download manager, and I’ve noticed that all the web pages I’ve encountered don’t seem to set the ContentLength header, whereas other media types (images) do. However, when I load a page (in Firefox), I get a progress as it loads. What’s that based off if not file size?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T22:49:17+00:00Added an answer on May 14, 2026 at 10:49 pm

    Because a web page may be the sum of many downloads, any of which may have an unknown size, the progress is more the number of items completed compared to the number of items requested than a precise measure of bytes. And I think most browsers include dns resolution as a significant chunk of the progress.

    First choose an amount of progress to give to dns, redirects and other handshake involved in getting the first byte of the main document, say 20% of total. When you get the first byte of the main document, you are at 20% progress.

    You might also reserve a little tail space of the progress for running javascripts and doing page layout. Say another 10% leaving 70% to represent downloads.

    As the main document is downloading, count all the additional resources that will need to be downloaded. If there are 50 additional resources, then the main document represent 2% of the remaining 70% of the download, so when it finishes you are at almost 22% progress regardless of how big it was. As each of those 50 resources arrives the progress goes up a little.

    You might weight things as the size becomes known or even by type. So maybe css files count as 1 item, images as 3 and movies as 10. For any of these items that the size is given, you can increment the overall progress more precisely.

    In a nutshell, it is an aggregate progress bar representing any number of tasks. Even if the number of bytes for a given task is known the time is not.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

That's pretty much it. I'm using Nokogiri to scrape a web page what has
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
Let's say I'm outputting a post title and in our database, it's Hello Y’all
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I've got a string that has curly quotes in it. I'd like to replace
I have a small JavaScript validation script that validates inputs based on Regex. I
I have a French site that I want to parse, but am running into
I'm interested in microtypography issues on the web. I want a tool to fix:
I am doing a simple coin flipping experiment for class that involves flipping a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.