Imagine that we have a website (SPA), all pages are loaded with Ajax, for example, we use history api. Is it possible, somehow, to show the user page load progress? It is not some kind of animation, but real data. An example of what I mean is the red download bar, at the top, on youtube.com. I do not think that there is real progress, but still, I want to hear ideas, despite how stupid this idea is. That's all, considering what's on the nodejs or php backend. As I did (but it turned out just faykoprogressbar, but it looked beautiful):
When the user clicks on the link, the progress bar begins to fill, the animation speed at this stage is equal to max. time waiting on the server in accordance with the width of the progress bar itself.
If the answer came, then quickly, smoothly, fill the progress bar to the end (300ms for example).
- If there is no answer, then we wait for an error about the expiration of the time-out and hide the progress.
All this is tied to time, as mentioned above - it looks good, well, just like it was done on YouTube. But I wonder if it is possible to show real data, up to the size of the loaded page and the download speed right on this progress bar.