Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

110
Views
how to get info about page loading from server

Many times I've seen live progress bars indicating amount of data loaded from heavy-data web apps notifying users about loading process (% or filling bars) before page started rendering. How can it be implemented?

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

I think that there is no perfect solution. And certainly not one correct answer. It mostly depends on the capabilities of the API/Server. I focussed on how to get the progress towards the frontend. And there i see three different types of data transfer.

❌ Timer (Worst solution) You can use a timer based on the average loading time. I don't think I have to explain why this is not a good solution. But this does not really give a correct loading state.

✔️ Polling You can use a polling system to retrieve the data. When the data is not ready yet you return the progress. If the data is ready, return the data. For example:

Step 1: GET the data from the REST-API
        This call returns an id linked to the request. F.e. ID-1

Step 2: You poll each couple of (mili)seconds the status of the request, based on the ID.
        This call returns for example:
          {
              status: 20,
              data: []
          }
        As soon as the status is 100, the data is provided

✔️ Web sockets Instead of polling you could also use sockets to update the frontend with the correct status. The server will publish the status towards the frontend. For this approach you will also need a certain type of ID to make sure you only receive your progress.

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!