I’ve made some more small changes to the site design.
- The list items in the post list are now columns using CSS flexbox. Previously the date and title were just separated by white space. Now the title wraps properly on mobile displays, it should appear more ‘visually consistent’.
- Added navigation pointers to the bottom of each post. 👈
- A sitemap is now generated on every build, but I haven’t rewritten the script to copy it into the site root.
- Article text is now justified, with some hyphenation to balance out the spacing between words. This feels like a good compromise, but I always wonder if I’m sacrificing legibility for aesthetics?
It still looks beautiful in Lynx.
Looking at the site stats, the majority of requests are not referred from elsewhere. I suspect that means whoever checks this blog (people check this blog?) typically goes directly to the main index. It might be helpful if the index loaded faster, so I rewrote the site to inline all the CSS in the header of the main page, following this tutorial. The CSS is all copied and compressed during site generation, so I don’t need to worry about keeping the inline code up to date. The idea behind serving everything in one file is that it cuts down on HTTP round-trips. One file, one request, faster page loads!
The limit for one HTTP trip is about 14kB, while at the moment the main blog page is 7.9kB, well under the limit. The HTML is compressed too.
Is this still necessary? 5G towers are going up in most cities around Britain. Oxford doesn’t have any yet, but it’s only a matter of time. We can count on mobile internet getting faster every year, and the page already loads reliably in under half a second. I made a similar optimisation to my contact page last year, and only really noticed the difference when I was in Venezuela on an extremely slow network.
There’s another argument that you should really be relying on the cache instead, that’s where the real savings are. Without going into (more) aggressive caching, I think the site is as fast as it can possibly be at the moment.