I know folks get real mad when I say this but in times of widespread security crisis, static sites sure are nice
Also posted to Bluesky.
77 replies
-
@devolute my anxiety could never
@zachleat 💯 A decade or so ago I was running all my sites, even static ones, on my own PHP VPSes. Now everything is 99% static (on 11ty!) and any backend stuff uses lightweight Node servers on a tiny VPS.
going to the SPA 🧖♂️🧖
…wait
There're reasons I stopped using WordPress and other CMS's and this is one of them, a big one.
For me it's because as much as I try I can't learn PHP :/
I've never seen a typical LAMP WordPress website not being hacked in some way. Something always happens and gets breached.
@zachleat please, don't do these things.
saying this things aloud is how we get a catastrophical apache / nginx zero day :D
I hope no one is still using those PHP sites I built 20 years ago! 🫣
The irony is they wouldn’t be affected.
@zachleat they shouldn’t. a status.html page should be static, served in a subdomain and a from a separate server (or vps). that even MDN doesn't practice that is proof how the appification of web development has degraded the practice of developing actual websites.
@blogdiva But the MDN is static, so why should we add more static pages to a static site that regenerates its HTML pages once every 24 hours?
@tristantheb @blogdiva nice yeah! I remember this https://developer.mozilla.org/en-US/blog/mdn-front-end-deep-dive/
Ironic thing to post on a social media website
only if you think a social media website can’t be static 🥹
How would you do a social media website without a server?
I think you’re probably getting at how to accept input/writes without an app server but the simple/fair answer is that you wouldn’t — lots of wiggle room to explore there though.
If you have an app server that processes writes, then you're exposed to whatever vulnerabilities the language has. It's a PHP bug, not a JavaScript bug.
hmm… in your mind how does a static site relate to JavaScript?
I believe a static site would just serve static HTML and CSS with no server. JS makes it dynamic
oh interesting. that’s not the classification I’d make but it makes our conversation make more sense now!
If the static site has a server and JS then it's just as vulnerable to these things as any site that has a server and JS and isn't calling it static. I don't understand how a static site that has a server and JS would avoid these vulnerabilities
@zachleat I've started using Astro which lets you use all of the fancy javascript coding you could ever want, to make completely static sites in production
@DoubleBuffered never heard of it!
@zachleat nothing to patch on a pile of html files is a pretty nice feeling today lol
@timapple @zachleat There is a certain irony that an nginx security release happened around the same time. However, that one was pretty minor in comparison to the php thing.
https://lists.debian.org/debian-security-announce/2026/msg00490.html
@Andres4NY @zachleat ha, of course nginx picked this week too. at least a minor one is just an apt upgrade and move on
every time I get mad I have to edit frontmatter or whatever I remember that at any point in time four trillion bots are bouncing off of my site like water off a very poorly coded duck's back
when someone says agentic I always think of

And with @sveltiacms.app you don’t even need to edit frontmatter!
Somewhere there's a developer protecting a personal blog with OAuth, Kubernetes, and military-grade encryption. It gets 11 visitors a month, eight of whom are bots.
I just saw something about vulnerabilities in PHP. Wild. I'm static by night and vulnerable by day (my side hustle projects are all static, my day job is wordpress...)
yes you likely need to update immediately!
yep!! on it :🫢
*but who serves the static site*
In my case, Node

computers are a mistake

hand delivered by carrier pigeon or station wagon (full of hard drives)
are they 5G pigeons or fiber? Where can I sign up?
localhost:8080 has all the details
I build my own engine to serve mine. No Node, no PHP.
A memory safe web server / reverse proxy. Because obviously something as critical as that would be memory safe. We're not all running c code in the critical path still right... Right?!

caddyserver.com caddy is your friend. 😛
Caddy is ❤️
Did you ever get a free tshirt for how much you shill it? You deserve one
This is the one time Luke is right to be fair, so hes running with it.

Now you're getting too big for your britches, reel it in Luke
-
the lazy pit of success
D̶o̶n̶'̶t̶ give me static
I was feeling smug, then remembered I'd dropped a PHP file into my static site to screen and email me form submissions...
I think the underrated part is where the risk moves. With static output, a vulnerable dependency lives in the build rather than on a running server, so patching becomes a rebuild and a deploy instead of a scramble to find out what was exposed.
@zachleat this is why https://xrforge.isvery.ninja is a static website generator..i dont trust my own code in server-mode 😅
@zachleat A long long time ago, static sites were all we had. I built a wonderful website for a business directory, hundreds of entries, everyone listed in up to 4 different category/subcategory pairs. It started from an Access database they gave me, took 5 minutes to run on a 486 PC/linux, and produced all the cross-linking pages for the index, each business, all the category, and each of the category/subcategories.
When I upgraded to a Pentium it took 1.5 minutes :-)@zachleat After a couple of years, someone else got the customer and made it all LAMP stack. They couldn't figure out how to do all the category/subcategory queries, so the site lost all that functionality. Just, wow.
@yojimbo Intel Inside! what year was this?
@zachleat around 1995 perhaps? it could have been earlier, the pentiums came out in 1993 according to wikipedia, but I'm not sure how long it took for them to become "reasonably available" in my location.
@zachleat Now I'm starting to double-guess if the original was even Access. I know the categories were all arbitrary and self-declared by each company registering, there was some effort to conform to pre-existing ones but it was a manual process.
Anyway, static sites can be arbitrarily awesome :-) and a good design process can trade processing for disk space well before the webserver itself gets involved!@yojimbo that’s awesome! certainly the earliest static build I’ve heard of!
@zachleat Oh boy, you want to know what I was doing back in 1995 then lol. We were operating an SSL website, which pins the date to 1995 as the earliest (therefore my other story needs to move forward a year I guess) and we had a 40-bit cert, one of the first to be deployed outside the US (small cert size because of export restrictions)
The website provided an actual catalog of things to buy from several different vendors, and collected ccard data for offline processing. Fun days!@zachleat Now, you don't want to know how we got the order and associated ccard from the web server to the customer, do you?
That was a little embarrassing, involving multiple emails with "the first few digits" on one message and "the next few digits" in another. And of course email wasn't encrypted.In a spooky voice: "This was before PCI existed and ... bad things happened ... on ... the Internet!!!!!"
@zachleat However, the site was very successful, as lots of people across the world ordered christmas gifts for their friends in the UK - i.e. no international shipping! Saved themselves a heap of money I hope!
hah jokes on you every CLI is written in node.js
i never joke about runtime versus build time vulnerabilities tom