Some observations on changes made to the site after the initial relaunch yesterday:
-
Initially I put <link rel="icon" href="data:,">
into the header of every page, to deliver an empty favicon and thus stop browsers from requesting /favicon.ico
on each request, but in the end I thought that simply having a tiny favicon would really be better. I mean (a) it's just a hack isn't it and (b) all those bytes would add up after a while. A favicon with a really long cache time would be best. So I put a 1-bit colour 16x16 favicon in. Hello favicon.
-
On the subject of caching I added some .htaccess
rules for browser asset cache times. You can read about doing that here. Given that all these pages are static HTML files I can actually have text/html
cached too, though I've set the time quite low for the moment.
-
iOS browsers decided they wanted to auto-format the date on each blog post as a phone number 😡 I dislike this behaviour intensely and up with it I will not put, but it's oddly difficult to tell iOS not to do this.
In the end the only effective way I found was to add a ‍
to the end of each date, which is a zero-width joiner, which I'd never heard of before, so that was a learning experience. This is definitely a hack but I'm going to leave it alone for now as it works.
-
On the styling front generally I added a little flex and a media query for phones in portrait, but that hasn't increased the file sizes because...
-
...I also added a minifier to my build workflow, in this case the appropriately named "minify", which turns the pages into horrible, horrible code, but code which is small and does work. Please don't look. It also squashes the CSS but just in an unreadable way. There are probably more sophisticated minifiers out there but honestly I can't be bothered right now - it's not like I need to minify the pages, they're already completely tiny.