5 ms·
"Everyone wants a SPA" is such bullshit. GitHub used to just load for a hundred milliseconds and then show me everything I needed; now it loads for a hundred mi
by mort96 7y ago
"Everyone wants a SPA" is such bullshit. GitHub used to just load for a hundred milliseconds and then show me everything I needed; now it loads for a hundred milliseconds and shows me a spinner while it does another roundtrip for some javascript, then parses and executes that giant truckload of code, then does _another_ roundtrip to get the JSON or whatever describing the data I actually want to see, then executes its boatload of javascript to update the DOM. Reddit is the exact same story; in the time it used to take to show the content, it now manages to load a spinner. Facebook also just spends the first few hundred milliseconds loading loading indicators. YouTube too.
Browsers are awesome at rendering HTML. They render each element the instant just the necessary bytes have crossed the wire. Browsers can't help you if you need to first load the HTML, then load the scripts, then load the complete giant JSON blob from your API, then add the elements to the DOM.
I'm in Norway, with high ping to the US. My ISP isn't the most reliable all the time. That nice server you have 0.01ms ping to, where you can't notice the difference a few extra roundtrips makes? Well, each roundtrip might take an extra few seconds for me.
- onion2k 7y agoGitHub works without JS just fine. Switch it off. In fact, I'm pretty sure Github is rendered server side for the first load. You shouldn't be seeing any spinners. I'd check if I wasn't on my phone.
- mort96 7y agoNope, the content is loaded dynamically from their API after the rest of the page has loaded: https://i.imgur.com/Kxs9l7j.mp4 https://i.imgur.com/Kxs9l7j.mp4 Sure, the list of my repositories is server rendered, but I already know my list of repositories. The thing I'm waiting for 99% of the time when loading github.com is to see if there's any new activity. Sorry about the graphical glitches, blame nvidia or xorg or gnome or something.
- onion2k 7y agoThat's disappointing. You're absolutely right that that particular page should be SSR'd.
- TurningCanadian 7y agoLikely because the list of repositories changes infrequently, so it's a better candidate for caching. They serve what then can quickly, quickly, then pull in the naturally slower stuff later.
- Izkata 7y agoLike 5-10 years ago, writing.com updated their content from loading static pages to be more dynamic. What they actually did was continue loading the content statically, then hide it behind a 1 or 2 second loading spinner that wasn't actually loading anything. Seems like users have just come to expect spinners... (I don't know how the site currently works, haven't been there in a long time)
- hdfbdtbcdg 7y agoGithub is annoying. Some pages are SSR some aren't. The js is quite resource hungry so I tend to keep js off for github until I get to a page that needs it.
- pojzon 7y agoThe worst example I can think of right now is: GMAIL.. God it went downhill lately. It can take 20 seconds on a decent machine for it to load all the shitty plugins i dont even need but still block me from using a mailbox.. Loading "html only" version is pretty much instant and has everything I need to use the demn mailbox..
- NeoBasilisk 7y agoWow, I had this exact thought the other day. I loaded the page, and just sat there and watched this animation on the screen. "What is it doing" was all I could think. All I need it to do is load the subject line of the first however many emails in my inbox. It can't be that complicated.
- buboard 7y agotry adsense / adwords / google search console if you think gmail is slow. will be an interesting experiuence
- BlueTemplar 7y agoHave you considered just stop using these shitty "websites" ?