Static sites are stable sites

April 29, 2014

The usually cited advantage of generating static HTML for your website is the performance you easily get. But there's another, slightly less obvious advantage of a static site: it's easy to preserve and to maintain in operation with basically no attention and effort.

Dynamic sites need code. That means you need a web host where you can run your kind of code and your programs, and it also means that you need to do all of the ongoing work to keep your site's code running. If it's code from other people you'll probably need to apply security updates and other changes from upstream (and perhaps do wholesale updates). If it's your code you at least need to make sure that it works with new versions of programming language X or package Y or the like. If you walk away from a dynamic site it's likely to wind up with security holes and may fall over entirely.

A static site has none of this. Pretty much anyone and everyone can host static files and they're basically never going to stop working. Your current HTML may not have the latest hotness in five or ten years but it's almost certain to render in browsers, probably decently (browsers are pretty good at backwards compatibility, especially if you avoid weird layout tricks). Keeping a static site up requires essentially no effort, it's feasible to walk away from it for years at a time (or even forever), and anyone can keep your site up. Migrating from host to host is also essentially a zero effort thing if you ever need to do that; just copy the files.

(In fact I have a static site that I haven't touched in more than a decade (by now it's basically a historical artifact) and apart from massive link-rot in external links I believe that everything still works fine. If I tried that with a dynamic site of any complexity I'm pretty sure I'd have an ugly mess on my hands. Just think of the shifts in language versions over the time since I last updated the site is scary.)

(This is of course related to my language longevity issue, in that with a static site you don't need to worry about that (among other issues).)

Written on 29 April 2014.
« How dynamic language code gets optimized
Backup systems, actual hosts, and logical hosts »

Page tools: View Source, Add Comment.
Search:
Login: Password:
Atom Syndication: Recent Comments.

Last modified: Tue Apr 29 00:17:56 2014
This dinky wiki is brought to you by the Insane Hackers Guild, Python sub-branch.