News for hackers. Stuff that matters.
Re:Why is modern web development so complicated? by mort96 on Wednesday August 07, 2019 @04:07PM (#20638374)
"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.

Re:Why is modern web development so complicated? by pojzon on Wednesday August 07, 2019 @04:46PM (#20638843)
The 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..

Re:Why is modern web development so complicated? by NeoBasilisk on Wednesday August 07, 2019 @06:33PM (#20639914)
Wow, 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.
Re:Why is modern web development so complicated? by buboard on Wednesday August 07, 2019 @10:01PM (#20641149)
try adsense / adwords / google search console if you think gmail is slow. will be an interesting experiuence
Re:Why is modern web development so complicated? by onion2k on Wednesday August 07, 2019 @04:37PM (#20638735)
GitHub 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.

Re:Why is modern web development so complicated? by mort96 on Wednesday August 07, 2019 @04:44PM (#20638821)
Nope, the content is loaded dynamically from their API after the rest of the page has loaded: 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.

Re:Why is modern web development so complicated? by onion2k on Wednesday August 07, 2019 @04:50PM (#20638890)
That's disappointing. You're absolutely right that that particular page should be SSR'd.
Re:Why is modern web development so complicated? by TurningCanadian on Wednesday August 07, 2019 @06:18PM (#20639774)
Likely 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.
Re:Why is modern web development so complicated? by Izkata on Thursday August 08, 2019 @11:45AM (#20645568)
Like 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)

Re:Why is modern web development so complicated? by hdfbdtbcdg on Thursday August 08, 2019 @04:52AM (#20642856)
Github 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.
Re:Why is modern web development so complicated? by BlueTemplar on Thursday August 08, 2019 @09:28AM (#20644314)
Have you considered just stop using these shitty "websites" ?