2026-08-30 - theokrueger
I stumbled across the rather interesting 1kB Club this morning, an aggregate of web-pages each less than 1 kilobyte (including HTTP headers).
It's curious, since there's not a lot of room to work with given the standard boilerplate of an HTML page. Despite this, some of the submissions manage to be quite interesting, with complex animated backgrounds or interactive features.
So I decided to make my own for fun. It's simple, but you can find it here! The 'stand-out' feature is the DVD bouncer. Sort of lame, but I didn't want to sacrifice the utility of the page in pursuit of novel features.
The actual HTML itself is only 760B, but there is a FAT HTTP header in addition to the page itself due to my hosting being through GitLab pages. I didn't feel like migrating providers just for this novelty, so my budget was significantly smaller than just 1kB.
The minified version is neigh unreadable.
<link href=data:image; rel=icon><body id=b><style>*{font-family:mono;color:#abc;text-decoration:none}:hover{color:#def}h1>a{color:#faf}#b{margin:0;display:flex;align-items:center;justify-content:center;height:100%;background:#123}#a{position:fixed}</style><a href=http://1kb.club id=a><1kB</a><h1><a href=mailto:me@theokrueger.dev>theokrueger</a></h1><ul><li><a href=/posts>blog</a><li><a href=/micro>thoughts</a><li><a href=http://github.com/theokrueger>git<script type=module>for(let M=Math,P=M.PI,s=a.style,x=0,y=0,h=P/4*M.random()+P*5/8,X=M.sin(h),Y=M.cos(h);;x+=X,y+=Y){let n=b.clientWidth,m=b.clientHeight,t=a.getBoundingClientRect();x>n-t.width||x<0?X=-X:y>m-t.height||y<0?Y=-Y:0;s.top=y+'px';s.left=x+'px';await{then:r=>setTimeout(r,9)};}</script>
Here's a readable version with only spaces and newlines added:View unminified source
<link href=data:image; rel=icon>
<body id=b>
<style>
* {
font-family:mono;
color:#abc;
text-decoration:none
}
:hover {
color:#def
}
h1 > a {
color:#faf
}
#b {
margin:0;
display:flex;
align-items:center;
justify-content:center;
height:100%;
background:#123
}
#a {
position:fixed
}
</style>
<a href=http://1kb.club id=a><1kB</a>
<h1>
<a href=mailto:me@theokrueger.dev>theokrueger</a>
</h1>
<ul>
<li><a href=/posts>blog</a><li>
<a href=/micro>thoughts</a><li>
<a href=http://github.com/theokrueger>git
<script type=module>
for(
let M=Math,
P=M.PI,
s=a.style,
x=0,
y=0,
h=P/4*M.random()+P*5/8,
X=M.sin(h),
Y=M.cos(h)
;;
x+=X,y+=Y) {
let n=b.clientWidth,
m=b.clientHeight,
t=a.getBoundingClientRect();
x > n-t.width || x < 0 ? X=-X : y > m-t.height || y < 0 ? Y=-Y : 0;
s.top=y+'px';
s.left=x+'px';
await{then:r=>setTimeout(r,9)};
}
</script>
It was fun to do this kind of problem solving, since it is really an entirely different set of skills than just making a nice page.
There are a few clever tricks save a few chars in our stylesheets:
* for everything else, not caring that it's slowBrowsers are really good at doing their best to render malformed content. It's kind of dumb in many cases, but very useful for our purposes since we can:
<!DOCTYPE html>, and even <html>, <head>, <body>data:image as a placeholder to prevent favicon fetchingAnd all of our intentional mistakes do not show to end users at all! It saved quite a few characters.
Javascript is probably the best language to golf in; silly languages are befitting of silly activities.
There are countless little tricks I tried over the iterations, but I ended up only needing a few:
for syntax to save one semicolonif else as chained ternary statementsI have a few ways to reduce it further in mind, but I don't want to change the functionality of the site in doing so. There are already two critical bugs I don't have the ability to fix, both stemming from having to cut down bounds checking as much as possible.