17 comments

[ 2.9 ms ] story [ 45.5 ms ] thread
(comment deleted)
They've built it wrong. You need JavaScript to call an API many times to get the data to build the HTML of each page.
(comment deleted)
Because they make money from being the best place to buy the kind of stuff they sell, rather than from trapping enormous numbers of people into viewing enormous numbers of advertisements.

Mcmaster doesn't have the best prices, they don't have every part imaginable. Their value-add is the shopping experience, so it's unsurprising that they do it very well.

And for those not in-the-know, they have incredibly fast shipping; order on the afternoon of one day, get it the next morning. And they aren't charging an arm-and-leg for shipping costs. And you know the provenance of the parts, since there aren't any third-party sellers. And you can get material certs and DFARS compliant items. And you get their curated catalog of quality stuff, and not 50 different shady pressure regulators or whatever. I guess that could all be considered part of the shopping experience. I wish more sites/businesses would strive to be the McMaster-Carr of X.
That’s just how the web used to work in 1901.
There's some modern things in here too, like worker thread, and pre-fetching on hover. One modern thing that is notably not in the web page: React-centered design.
To save you a click:

apparently https://www.mcmaster.com/ is very fast. A person who worked there chimes in https://x.com/mattwensing/status/1847277743228002635 saying they focused on speed (competing with paper catalogue), used VB.net and SQL Server with stored procs.

Some other guy explains https://x.com/wesbos/status/1847047872770199647 :

· Agressive pre-loading pages on hover

· fixed image dimensions - there is no layout shift when they load

· Dependency Injection (huh?) - only loading the JS needed on the pages where its needed

· Uses pushstate to change pages so it feels faster than a full reload

· agressive CDN and browser caching

· Server rendered HTML (ASP .net)

Funny enough they load almost a meg of JS (YUI and jQuery) but you dont notice because it feels so snappy

He made a video explaining it: https://www.youtube.com/watch?v=-Ln-8QM8KhQ which is a lot more interesting than the inane tweet. Maybe we could replace the link with the video?

> Server rendered HTML (ASP .net)

Who could've imagined that some React monstrosity that makes 300 API calls to build each page locally isn't the best way of doing things?

The best part of these methods is that the site would work nearly just as fast on a freaking PDA from the 15 years ago. This is the direction the web was heading before React took over everything.
That's true, we really lost that. Every page would load like static one.

Now pages not only take 3-20 seconds to build locally, but there are necessary cookie banner interactions and calls to action (Substack, Medium) that you need to dismiss before you even see the content.

Or they're like m.facebook.com, and just don't load properly at all.

You'd think that with what Meta pays, they could afford to hire someone who knows how to build a web app.

Just trying it out HN responds to clicked links about twice as fast. Although mcmaster is pretty good.