NobodySpecial's Blog
A mirror of https://git.envs.net/NobodySpecial/Blog
RSS Feed

The 512KB Club

I recently tried to get this site into the 512KB club, a set of websites where all the resources on a page are less than 512KB (in case that wasn't obvious by the name). However, when I submitted the PR to get this site added, the request was rejected because my homepage was only a set of links to articles.

At first I was pissed off - I didn't create my own CMS specifically for this website just so it could get written off as not having actual content. It's a blog - the only purpose the homepage serves is to refer users to the articles. But I realized they were kind of right - no user will visit the homepage of a site, see a set of links with no explanation, and think "oh, this is the person's personal blog". So, I added article previews. As of now, this blog has made it into the 512KB club.

Of course, this article isn't actually about the 512KB club; it's about the modern web design and the philosophical ideals this blog was designed to support.

My blog's design philosophy:

The first requirement this blog was designed to meet is to be usable on CLI-only systems. This includes from both the publisher's and user's perspective. Content is published through Git and automatically mirrored to Neocities. This means all that's needed to publish is the dependencies of my upload script (which has only a very minimal set of dependencies, none of which involve a GUI in any way). For users, all that's needed to read content is access to the git command. Alternatively, this blog's Neocities mirror has been tested to render properly on elinks, links, lynx, and w3m.

The second requirement is it should work without JavaScript. The modern web has become so bloated with the language, and simply having support for JS enabled in-browser can become a potential security risk for users. As such, not only do I support users who disable JS, but I actively encourage users to disable it. This site contains exactly 1 script: a script that detects if users have JS enabled, and if so, tells them to disable it. The script intentionally doesn't account for LibreJS, since users who use LibreJS shouldn't see the warning anyway. But users with unrestricted JS should. Unfortunately, this means my site will never qualify for the NoJS club, but that's ok.

Originally this blog required JavaScript to be enabled in users' browsers, as a temporary thing while I was getting things setup initially. However, shortly after releasing the second article I found the time to fix this. This blog now meets its original goal of providing first-class support to users who disable JS, while also actively encouraging users to disable it if they already have it enabled. The JS-enabled version of this site has no benefits over the JS-less version... Unless you consider a slightly-ugly warning to disable JS a benefit.

The third requirement is minimalism. With my previous blog, serpentsec.1337.cx [archive], I was restricted to the requirements of the blogging platform (Write.as), and was thus unable to get the site to fit within the 512KB requirement I wanted to strive for. However, on this site, everything is made from scratch (although I did copy-and-paste much of the styling from the old serpentsec.1337.cx). With this site being written from scratch, I could quite easily fit it within the 512KB size requirement I had hoped for. Actually, this blog fits within <100KB, which qualifies me for the 512KB club green team (their most exclusive tier). This also means my site is friendly to users on low-bandwidth connections or who have strict quotas.

Update: Apparently serpentsec.1337.cx does fit within the 512KB size requirement. However, since it's a dead site that's a moot point anyway.

The fourth requirement is it should minimize dependence on CSS. In fact, users can disable CSS support entirely in their browsers and this blog will still be usable. It uses CSS to look good, but it doesn't depend on anything except HTML.

The fifth requirement is it should avoid any third-party resources. My blog only fetches 2 resources on page load - the page the user is visiting, and the CSS styling. This makes it easy to assure users that no tracking is happening based on 3rd-party scripts.

The sixth requirement is it should be auditable. Every change to this blog is pushed to the blog's git, then programmatically mirrored to my Neocities page. This makes it easy to tell whether the site isn't doing anything it shouldn't. The content of the Neocities mirror will always directly correspond to the contents of the git repo. Also, all commits are cryptographically signed, adding a cryptographic proof of what the site should look like.

The seventh requirement is it should be open. All source code and content is licensed under the Creative Commons Attribution 4.0 International license. I also wrote my upload script so people can create their own blog with an identical structure to mine, simply by cloning the repo and replacing the articles with their own. If they use Neocities, they can even have the upload script automatically mirror their content by performing the collowing steps:

  1. Fork my blog's git repo
  2. Replace my content with their own, by overwriting the contents of articles/
  3. Update config.sh to reflect the details of their blog instead of mine
  4. Add their Neocities user:password to apikey.txt
  5. Run upload.sh to publish their content and automatically mirror it to their Neocities mirror