Weeknote 28, 2025

One Year of Weeknotes!

Hello world!

A year in review

It has been 1 year since I picked up writing weeknotes! I’ve managed to keep up with doing one every week (even if the timing has been all over the place), only missing one week on accident which I then added to the following weeknote.

Honestly, when I first started off writing these, I was expecting something a little deeper than what I turned out to be doing, but I don’t think that’s necessarily a bad thing. While I would like to write a little more on my thoughts of the week at some point, just being able to give myself an opportunity to properly think about my activities of the week and semi-reflect has been better than not doing anything. This site would be pretty stale otherwise, as I very very rarely get into the mindset to do a conventional style blog post.

So, I’m going to keep going with weeknotes for the foreseeable future! I hope as I improve other parts of my life (namely sleep quality and properly partitioning time for things), I’ll be able to get these out at a more consistent time (recently I’ve been getting these out on Mondays instead of Sundays) and also even have more exciting and different things to talk about more often. Time will tell.


This week

For a while I noticed that my I pretty frequently needed to force a cache empty when wanting to see updates on my website, and I finally discovered the root cause this week.

This website is (currently) a fully static generated Astro project, so I use the awesome Caddy as a simple static file server and it works perfectly dandy. I also use Nix to build the website in CI as it’s what I’m used to now, and it’s also been working great.

However, I was looking at the network inspector in my browser randomly and noticed that all the asset requests were getting a Last-Modified header with the Unix epoch. This was because Nix zeroes out the modified tag on files to ensure reproducibility! Thankfully this was a super simple fix, just needing me to set header -Last-Modified in my Caddyfile.

Investigating this problem brought up a further issue, the files weren’t being served with an ETag header, which can help with browser (and CDN) caching. This is because Caddy explicitly doesn’t set the header if the modified time is 0 or 1, because apparently it’s useful in Nix environments somehow. So, as a remedy I created astro-etag, a simple Astro integration which creates sidecar .etag files with a computed hash which can then be read by Caddy’s file server with just etag_file_extensions .etag.

Overall a fairly simple issue but I got an excuse to build something that might be helpful to a small group of people somewhere.


Loading comments from Bluesky...