Re:Why some apps use fake progress bars (2017)
by emodendroket on Saturday February 03, 2018 @01:46AM
(#16296551)
I don't know why every thread about Web applications needs someone to tell me that technically HTML was just designed to be a document format. OK, great, now it isn't just that.
Re:Why some apps use fake progress bars (2017)
by tinus_hn on Saturday February 03, 2018 @04:31AM
(#16296913)
First someone states that the way web sites work now sucks. Then the next person states, ‘Well we used to build sites this way and then it doesn’t suck’. And then the next person comes in saying ‘well that just isn’t the way we build sites now’.
If that isn’t the way we build sites now, either change the way we build sites or accept that it sucks. But this is Hacker News so we’re supposed to think about different ways to build sites than what we do now.
Re:Why some apps use fake progress bars (2017)
by emodendroket on Saturday February 03, 2018 @10:09AM
(#16297885)
It's just... what's the point of talking to anyone who will listen about how HTML was designed for hypertext? Yes, we all know that. Today the world's most-popular Web sites include YouTube and Facebook. We aren't going back.
Re:Why some apps use fake progress bars (2017)
by scoot on Saturday February 03, 2018 @06:13AM
(#16297167)
This a (mostly) solved problem. With Server Side Rendering the html payload delivers what the client side is would have rendered. The client side js takes over rendering after it loads.
Re:Why some apps use fake progress bars (2017)
by fpig on Saturday February 03, 2018 @11:49AM
(#16298310)
He did not say that. Generating the HTML for the initial page load server-side does not make HTML "just a document format". It improves loading and search-friendliness of your web site.
Re:Why some apps use fake progress bars (2017)
by pletnes on Saturday February 03, 2018 @03:58AM
(#16296857)
That’s true, but I can mention several online stores that do this. Even on a good network the site remains blank for seconds at times. If they at least served me a logo I’d know the site wasn’t dead!
Re:Why some apps use fake progress bars (2017)
by Bromskloss on Saturday February 03, 2018 @06:52AM
(#16297263)
> I can mention several online stores that do this
I would like to hear which ones they are, that I may try them.
Re:Why some apps use fake progress bars (2017)
by chatmasta on Saturday February 03, 2018 @04:46AM
(#16296942)
I solved this in a react app I’m working on by overriding XMLHttpRequest.prototype.open to listen for the request lifecycle events and update a global “percent loaded” used to render a progress bar at the top of the page.
It’s far from perfect but is at least a good enough heuristic for the user to know when the page is loading a request.
Web browsers have progress bars.
I think your complaint is with "sites" that just serve a JS payload and then load "the real site" entirely from requests made by JS. Turns out if you generate and serve actual HTML, you get a progress bar for free!