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

  • Home
  • SEARCH
  • 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 709773
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T04:32:25+00:00 2026-05-14T04:32:25+00:00

I want to download a document from a server. Creating the document in the

  • 0

I want to download a document from a server. Creating the document in the server takes some time, and I need to measure the time it takes from clicking the link to the end of the download process at client side. (or to the beginning of the download?)

Any way for this?

Thanks

  • 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-14T04:32:26+00:00Added an answer on May 14, 2026 at 4:32 am

    Re your update in the comment:

    When the user clicks the link, I want to inform the user that the request is being processed; something like “Please Wait”. And when the server side process is completed and the download starts, the “Please Wait” text should be invisible.

    As I said in the comments, this is not as easy to do for a document download as it is for a web page.

    A way that would be guaranteed to work is loading the document into an iframe (so that the whole page doesn’t freeze), and polling the document’s production status from the outside document using Ajax. That could be achieved half-way easily if you can make your document generating PHP script write the production status (“working” / “finished” or even a percentage value) into a text file that the Ajax call can query frequently. You would name the text file by a unique random key that would have to be created in the page containing the download link, and passed to the script generating the document.

    You might be able, as you say, to query the IFrame’s status somehow but I wouldn’t know a defined way to do this: There will be no onload event (because no document will be loaded – once the browser receives the information to expect a file download, it will pop up the “Save as” dialog and leave the IFrame’s context completely). However it could be that the IFrame’s src property is set only when the document is produced (i.e. when the content-type and other headers have been sent) – you would have to try.

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

Sidebar

Related Questions

I want my web application users to download some data as an Excel file.
There's this Excel file I want users to be able to download from my
I want to download this open source application, and they are using Git. What
I want to download and parse webpage using python, but to access it I
I want to provide dynamic download of files. These files can be generated on-the-fly
I want Windows Update to automatically download and install updates on my Vista machine,
I want to get the size of an http:/.../file before I download it. The
On a PHP-based web site, I want to send users a download package after
On our site www.foo.com we want to download and use http://feeds.foo.com/feed.xml with Javascript. We'll
I've tried Apache FTP Server but it lacks document and support. And it's totally

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.