🧵 Two of my most- and first-used checks when doing a performance audit are surprisingly old school: 1) Validate HTML 2) Disable JS.

Validate HTML? Yep. We haven’t really cared about ‘valid HTML’ for valid HTML’s sake for about a decade, but certain errors can actually be pretty significant. What’s wrong with this picture?
It’s this lil’ fella right here. isn’t allowed in the , so when the browser encounters the , it assumes the should have been closed already.
This is a feature. This is what allows us to omit certain closing tags like

, , , and—you guessed it!—. The appearance of certain opening tags implies the closing of certain preceding ones.
The practical upshot of which is that non- elements early-terminate the tags, pushing all of your important resources into the . Oops!
Disable JavaScript? I think building sites for people who’ve turned JS off is an expensive waste of time: they’ve turned it off! Leave them to it. But! I do feel it’s vital that we can fail reasonably elegantly when JS fails (and it will).
I strongly hold @adactio and @jaffathecake’s respective (and paraphrased) opinions about JS: ‘How well does it fail?’ and ‘All your users are non-JS until your JS is downloaded and run’.
From a performance perspective, I don’t want to see your core content buried away in JS. JS is slower than HTML. If you need JS to display core content, you’re on the slow path. The quickest way for me to ascertain whether content is coming out of JS? Disable it!
Do I care that CNN doesn’t work with JS disabled? Not necessarily. But immediately I can see that their content is reliant on the successful download and execution of JS. This is always going to be slower than having it in the HTML—the first (and successful) response.

More from Tech

1. One of the best changes in recent years is the GOP abandoning libertarianism. Here's GOP Rep. Greg Steube: “I do think there is an appetite amongst Republicans, if the Dems wanted to try to break up Big Tech, I think there is support for that."

2. And @RepKenBuck, who offered a thoughtful Third Way report on antitrust law in 2020, weighed in quite reasonably on Biden antitrust frameworks.

3. I believe this change is sincere because it's so pervasive and beginning to result in real policy changes. Example: The North Dakota GOP is taking on Apple's app store.


4. And yet there's a problem. The GOP establishment is still pro-big tech. Trump, despite some of his instincts, appointed pro-monopoly antitrust enforcers. Antitrust chief Makan Delrahim helped big tech, and the antitrust case happened bc he was recused.

5. At the other sleepy antitrust agency, the Federal Trade Commission, Trump appointed commissioners
@FTCPhillips and @CSWilsonFTC are both pro-monopoly. Both voted *against* the antitrust case on FB. That case was 3-2, with a GOP Chair and 2 Dems teaming up against 2 Rs.

You May Also Like