revision 10: I am speed
the treehouse now caches most static assets, so that they don’t have to be redownloaded. especially that very large font, which I should probably optimize now that I think about it!
there are some minor exceptions to this, which include:
pages themselves. we cannot cache those at all. well, maybe in release mode, for like 10 seconds, which defeats the point.
we can only cache those assets which are guaranteed not to change given their URL.
caching on the treehouse is performed by means of a
?cache
query parameter which contains a truncated BLAKE3 sum of the cached file’s contents. that way we can tell the browser to redownload the asset by changing out the hash.this is impossible to do for pages, because they may change at any point in time.
I tend to update the treehouse very often - including post-deploy, if I fuck something up - so if I enable caching for e.g. an hour, and people visit the broken version, they’re then stuck with a broken version for an hour. seriously, timed caching is not a good solution for incremental website updates.
revision 9: summer cleaning
there are now a bunch of colorful icons next to pages
experiments show that this improves readability by 100% despite the icons being ugly and blurry due to not integer-scaling. it’s not like I can really fix that though, since they’re next to text; good luck making pixel-perfect icons that are meant to appear next to fonts of like 10 different sizes that increment by very little.
the treehouse’s design is now certified 4% more accessible :verified: by means of using
rem
metrics for all the UI elements, so now the UI will scale depending on the font size you’ve set in your browser. ain’t that cool?on the one hand it seems cool, but I have to note here that I designed this website with 14px fonts and pixel metrics in mind. having switched it to
rem
everywhere might have produced some wonky layout bugs; if you find any, please report them to me!
revision 2: just really comfy UX
first thing you probably noticed: added indent guides (may require a modern browser due to usage of
:has
)/b
endpoint is now used for shorter links. it also generates OpenGraph metadata so that Your Favorite Messaging Platform can display the linked branch’s contentinternals: branches are now based on flexboxes rather than background images. this requires sending a bit more HTML, but the layout is a lot more stable as well as being easier to extend