How is this Website so fast!? (www.youtube.com)
from mesamunefire@lemmy.world to programming@programming.dev on 21 Oct 16:26
https://lemmy.world/post/21109791

#programming

threaded - newest

burgersc12@mander.xyz on 21 Oct 17:33 next collapse

TL:DW Magic

xmunk@sh.itjust.works on 21 Oct 17:56 collapse

Nah, a lot of old tech. I used to work on shit like this… loading all your images (including the fucking rounded corners for IE) into a sprite… setting up caching, using prefetching and inlined CSS/JS for critical path stuff.

There was a whole industry around web performance in the days that a customer might be trying to download your site over their 256 kbps connection.

It’s neat tech and I miss fiddling with it. I honestly found it a lot more fulfilling than the SPA era of web design.

Jesus_666@lemmy.world on 21 Oct 18:16 next collapse

Aw, c’mon! Who doesn’t enjoy piping ten megabytes of JavaScript through Webpack to achieve those crucial on-scroll effects on an otherwise static page?

xmunk@sh.itjust.works on 21 Oct 18:48 collapse

Hey let’s not lie to ourselves… most of those megabytes of JS are there to disable the copy functionality for anyone browsing our site.

Why? … reasons. Someone in marketing said a thing once.

mesamunefire@lemmy.world on 21 Oct 20:50 collapse

I once had to add in custom tab behavior because a green screen used to work in a specific way in an ordering page. The IBM system that we replaced only had a couple of users but was responsible for something like 30-40% of all orders in a small company. So in it went! Fun times.

sjpwarren@programming.dev on 21 Oct 21:43 next collapse

Come to the HTMX side…

xmunk@sh.itjust.works on 21 Oct 22:06 next collapse

<Pig Latin instructions unclear, entire site rewritten in XHTML />

mesamunefire@lemmy.world on 22 Oct 06:25 collapse

Such a nice library.

RustyShackleford@programming.dev on 22 Oct 20:59 collapse

Noob question: What is the SPA era of web design; when did it roughly start?

xmunk@sh.itjust.works on 22 Oct 22:02 next collapse

By SPA I mean “single page application” it’s currently the dominant approach and powered in a large part by technologies like react and node. I’m not certain when it started precisely… with technology it’s more a case of “rising to prominence” rather than “first happened” I think it probably really started going around 2014 with HTML5?

SPAs are still pretty hot but they’ve waned in popularity due to overuse and general complexity. Essentially your website becomes a single page that just swaps out what’s shown to the user as they “navigate” between different parts of the site. When well done this can make a site incredibly responsive, but it’s often quite poorly done and responsiveness can end up blocked by server requests anyways.

Zos_Kia@lemmynsfw.com on 22 Oct 22:20 collapse

Interestingly the pendulum is now swinging the other way. If you look at next.js for example, server generated multi page applications are back on the menu!

xmunk@sh.itjust.works on 22 Oct 22:48 collapse

Yea, I don’t want to totally shit on SPAs but server-side rendering has a lot of advantages and is so much fucking simpler.

I’m a PHP dev and DB specialist in my day job - there are a lot of good server-side tech options.

Zos_Kia@lemmynsfw.com on 22 Oct 22:19 collapse

I’d place it right around when angular started gaining traction. That’s when it became common to serve just one page and have all the navigation happen in JavaScript.

bitcrafter@programming.dev on 22 Oct 18:43 next collapse

I disagree that the web site is fast; it took at least 10 seconds before the video would start playing.

zzx@lemmy.world on 22 Oct 23:00 collapse

McMaster Carr is the greatest site ever. I could browse forever