website transition is complete
the journal of Michael Werneburg
twenty-seven years and one million words
At long last, I've implemented the flattening tool on risktopics.com that allows me to keep my other sites snappy and secure. This utilizes a small perl widget (the cool kids still use perl, right) to make a local copy of the HTML spat out by the application engine (Apache). That flattened* copy is then minified** and saved in the nginx home directory where it is served up by that very lightweight and speedy webserver.
This improves not only the speed of the site, but the security, as it reduces the attack surface of the site by hiding Apache from interaction with parties on the Internet everywhere except the comments section. Which, if I'm being honest, is never used and can probably go.
*Flattening a website simply involves taking all of the bits and pieces put together by the content management system (CMS) and storing the result. It's an ancient technique that's been used by content delivery networks (CDN's) since at least the early 21st century (we deployed this in the 2000 Sydney games) and likely well before that.
**Minifying content is where you strip out unnecessary whitespace and other cruft to present a smaller download. It's a dated habit that means less today than it did in the past because webservers and browsers transmit compressed data, but the SEO engines still claim it's worth doing so I do it. Unlike encryption, which serves no purpose.