Long-term performance

Search within this presentation

How Irish tunes travel across generations

The host introduces Jeremy Keith through a story about an impromptu lunch discussion on HTML5. Keith explains how Irish musicians pass tunes on by ear, allowing variations to accumulate. He traces how Francis O’Neill’s sheet music and recordings by emigrant fiddlers made their way back to Ireland and shaped the tradition.

From crowded pub sessions to the transatlantic cable

Keith takes the audience inside an Amsterdam pub session and explains why musicians struggle to stay in time as the distance between them grows. He follows the problem of latency from orchestra conductors and the Battle of New Orleans to the telegraph, then traces how later communications networks built on earlier cable routes.

How plain text made The Session possible

Early dial-up connections led Keith to ABC notation, a compact plain-text format that software could turn into sheet music or audio. He started The Session by posting one tune a week, then opened the site to community submissions in 2001 while still converting the tunes into images himself.

Rendering sheet music without repeating the work

The 2012 redesign let Keith use abcjs to turn ABC notation into crisp SVG sheet music in the browser. Rendering dozens of versions on popular tune pages created a JavaScript bottleneck, so he began saving the generated SVG on the server and embedding it for later visitors. He explains why he accepted the heavier DOM and let the browser handle the markup.

Choosing a map based on what’s in the cache

Keith traces the move from static maps to interactive ones and weighs lightweight Leaflet against the larger MapLibre GL JS library. He shows how a service worker supports offline revisits and how page scripts can query the Cache API to choose a map. Visitors get the vector map when the larger library is already cached and the Leaflet map when it’s absent.

Adding a web font without shifting the page

After years of using system fonts, Keith adopts the Lora variable font and uses a comedy sketch about misplaced clicks to show what layout shift feels like. He adjusts Georgia’s fallback metrics to match Lora, sets the font display behavior, and splits the font into subsets so browsers fetch extra characters only when needed.

Measuring layout stability and making navigation faster

Keith uses the Chrome User Experience Report to check whether the new font increased cumulative layout shift and keeps the font when the metric stays steady. He compares navigation data across The Session, Wikipedia, and the BBC, then explains how Speculation Rules drive prerendering on his site. Cross-document view transitions also let him remove JavaScript he had written to animate page changes.

Building for another 25 years

Keith explains why he builds on enduring web standards and distills his approach from Resilient Web Design into three steps. Identify the core functionality, deliver it with the simplest technology available, usually HTML, and then enhance it. He closes by connecting the milliseconds that matter to site visitors with the generations that keep traditional Irish music alive.

I've known Jeremy for a very long time. He may not even remember the first time. It was actually in 2009 at an event apart in Boston. And this was, I was... I mean I've been in the web for a long time but it was the beginning of, going to conferences. The first one that I, as a consultant, paid for out of my own pocket and if anybody knows about Novenapart, that was not a small investment. Worth it, absolutely.

But Jeremy posted tweet in the middle of, middle of the first day, anybody want to talk about HTML five? Let's have lunch. And he stuck a sign in the middle of the table and myself and my colleague and eight other people sat around a table for an hour talking with the author of HTML five. And and I can't tell you what that meant to us both educationally but also as an inclusiveness in understanding this new thing and pushing that web forward.

And actually, couple of other people at that table have actually been friends with me since that day. And thankfully, one of those people is Jeremy. He's always inspired me. He's always taught me. And he's always so incredibly giving of his knowledge both individually in people that he supports but through events publishing, making material available online.

A warm welcome please for Jeremy Keith.

Thank you. Thank you, Jason. And thank you to everyone in this room for still being in this room and not leaving to go get a train or a plane or something. So thank you very much for being here. The people who aren't here, well they can't hear me, so fuck those guys.

I don't know about you, but my brain is is very full after the last two days. Is anyone... Yeah? Full brain? You got full brain? Yes. Okay. Well here's the good news. There is absolutely nothing new to learn in this talk because anything of value that is in this talk is merely repeating what other speakers have already said.

So at best, I will be reiterating what more eloquent people have already said. So you can relax. Sit back. Have you know, have a little nap. Whatever. I do realize as the last speaker, I am the only thing standing between you and beer and bitterballen. I think what you should realize is that you are the only thing standing between me and beer and Bitterballen.

So let's get this done. I'm going to begin, I'm not going to talk about myself, but I'm to talk about where where I'm from. I'm from Ireland. Who's been to Ireland? Let's have a show of hands. Oh, that's lovely. Did you have a good time? Yeah. Good. Good. Yeah. It's a good country. It's got a a rich cultural heritage, know, Nobel Prize winning authors and poets and, a rich musical heritage as well.

I don't just mean the new stuff, know, Fontaine's DC and CMAT and kneecap, all that good stuff. I'm not even talking about the slightly older stuff like U2 and Thin Lizzie and Van Morrison. No. I'm talking about traditional Irish music. This is the really old stuff. This is stuff that goes back centuries. Generally, a dance music.

It's music made for dancing. There's various kinds of dances, mostly jigs and reels, but there's other kinds as well, and some of these dance forms will be more popular in some parts of the countries than others. But mostly, I'm talking here about instrumental music rather than songs. So we call them tunes rather than songs, And these tunes get played on various instruments.

Again, going back centuries, some of them, you know, the illan pipes, the fiddle, other instruments are newer and, you know, instruments come in and out of fashion. I myself play traditional Irish music on the mandolin, which isn't a really common instrument in traditional Irish music. The banjo, the tenor banjo would actually be more common. But the important thing to understand about traditional Irish music as a tradition is that it is an oral tradition, as in it is passed on, from from person to person.

Now that might be people sharing tunes with one another. It might be down through generations. You know, somebody sharing tunes with the next generation of of musicians, but it is by ear. People learn these tunes by ear, which means a lot of variation creeps in which is a feature, not a bug, but that is generally how the the tradition is transmitted.

That is not to say that technology hasn't influenced the transmission of traditional Irish music over time. It has. Like so one technology for example would be printed sheet music. Something more associated with say the classical western tradition, but you can absolutely notate traditional Irish tunes in sheet music.

Like in this book here from Francis O'Neill. This guy had quite an adventurous life. He left Ireland mid nineteenth century. He got shipwrecked. He ended up in America. He ended up being on the Chicago police force. He ended up being the chief of police, and he started to put together this book of of tunes. I mean, word was back then like, if you were Irish in Chicago and you played a musical instrument, you were pretty much guaranteed a job on the Irish, on the Chicago police force.

So he collected these tunes and this ended up having a big influence on the tradition back home because you know, there was a lot of immigration in the late nineteenth century after the the famine. And you know, the music was in danger of dying out and then France O'Neill has notated this stuff down the sheet music which finds its way back to Ireland and some, you know, keeps the tradition alive. Likewise, in the twentieth century, we got the gramophone.

We got recorded music. And again, this had a big influence on the tradition. You had these fiddlers ended up in places like New York, Chicago again, and they would record, some of these these tunes onto records, which kind of became, smash hits amongst the, diaspora of Irish people. And again, these records found their way back to, Ireland, and those recordings ended up influencing the tradition.

So there's kind of this virtuous cycle between their tradition and technology, and it's just to show that the tradition has changed over time. Also, where the music was played has changed over time whereas, you know, in the past it would have been very much a rural tradition played for country dances, dance halls, or dances at the crossroads.

These days, it's it's it's more of an urban tradition. It's more likely to be found in pubs. And this is something that started really in in the nineteen sixties with sessions in London. The Irish music session is kind of where the traditional music lives now. And some of you will have already probably recognized where this particular session is taking place.

This is right here in Amsterdam. This is Mulligans, And this is where, if I'm ever in Amsterdam on a Wednesday evening, this is where you'll find me. I'll be playing in this traditional Irish music session in Mulligans, which is why I couldn't go to the speakers dinner. Apologies again, p p k. So yeah, was there Wednesday. It's a good evening.

It's kind of hard to explain what a session is because I can really only explain it by what it's not. It's not a performance. It's not a concert. But it's also not an improvisational jam session. It would take an entire talk to kind of explain what a session is. But trust me, I to say this is a good one. This is a really nice, comfortable, welcoming traditional Irish music session, and it's a nice size as you can see.

The table is like nice. You're close to the other musicians, and that matters. That matters matters because you know some sessions they start to get big. This isn't even one of the bigger ones. Like some some festivals they get really, really big. And it can be noisy. And then it can be really hard to play with the other musicians. Not just the volume, but literally the distance from the other musicians starts to become a factor.

Because this is fast music and you're trying to play in time with everyone. So distance becoming a problem, is this something you all recognize? I'm talking about latency. This is a problem of latency. And latency in music is is you know not restricted to traditional Irish music. Like the whole reason why orchestras have conductors is to solve the latency problem.

The speed of light is faster than the speed of sound. So if you watch a conductor, you're going to get that signal faster than if you're trying to listen to every other musician in the orchestra. And I'm sure you've all probably been at the rock concert, like a big stadium thing or festival thing where they've got the screen showing exactly what's on the stage right now, but the sound is like up to a second delayed and it's really discombobulating.

That's latency. And latency, I think it's kind of like the history of of humanity is latency. It's a mixture of of transmission and latency. Like how we manage to transmit information to each other, and then the speed that we manage to do it at. So with transmission of information, the big breakthrough obviously would have been language. The invention of language is the biggest breakthrough of the human species. Maybe the next one after that would be writing.

Now we can transmit information across generations. Right? But latency, for the longest time latency was limited to how fast a human being could travel. How fast somebody could run. How fast somebody could go on horseback. Pony Express. Whatever. And history is full of kind of tragedies of latency. One example of a tragedy of latency is from the War of eighteen twelve. This is the Battle of New Orleans, which is the closing battle of the War of eighteen twelve fought between The United States and Britain.

And this battle took place in January eighth eighth of eighteen fifteen. And I say it's the closing battle of of the War of eighteen twelve, but technically the War of eighteen twelve finished on 12/24/1814 with the signing of the Treaty of Ghent. But that was all the way over in Ghent, and this is all the way over in New Orleans, and it took it took weeks for that information to travel.

The latency was pretty long, and so we had an entire battle where humans died because of latency. And I think the problem of latency wasn't really solved until we got the telegraph. Thanks to Samuel Morse, someone who had his own tragedy of latency in his life. He was he was away on business.

A messenger arrived saying his wife had taken ill. He immediately left to get home, but by the time he got there, she had passed away. Had that messenger got to him sooner, maybe he could have been there before she passed away. So he set he set out to conquer latency effectively, and he did it with the invention of the telegraph.

Also inventing his own transmit and transmission format, right, with Morse code. But I do think this is the foundation of our modern world is the invention of the telegraph. It's it's absolutely huge. Particularly, so you had Samuel Morse in America, and then you had Cook and Wheatstone in The UK.

And when you joined those two worlds together with an incredible project, laying of a transatlantic telegraph cable. It was like the Apollo program of its time. Then suddenly the world shrank. Right? The speed of transmission was how fast electricity could travel through a copper wire. So this cable laid from Valencia Island off the coast of Ireland to heart's content in Newfoundland.

08/05/1858. That is when we conquered latency. The Sunday Times the next day said, and all the fond nothings of daily life should clothe themselves in elemental sparks and shoot with fiery speed in a moment, in a twinkling of an eye from hemisphere to hemisphere. And honestly, ever since then, we've just been improving on the telegraph. We got the telephone, so now we don't have to use Morse code.

We can use our voices, but it's basically built on the same networks that were already in place for the telegraph, like literally the same cables. And we got the internet. And okay, now we've got fiber optic cables. So now we can go literally the speed of light. But again, we're building on top of the existing telephone network, which is built on top of the existing telegraph network.

Like you look at where the undersea cables are, and you look at a map of where telegraph cables used to be, it's the same map pretty much. And then on top of the internet, we get the World Wide Web. So this brings us to the late twentieth century, nineteen nineties, the invention of the World Wide Web.

And this is where I'm going to enter the picture. I'm really into... It's the mid nineteen nineties, and I'm really into two things. I'm into this world wide web. I really like it. And I'm really into traditional Irish music. And I want to build something that combines these two things that I'm interested in. Now if I was going to do that today, I'd probably record some video, record some audio of traditional Irish music, and stick it on the web. Boom.

Done deal. That's not going to happen in the mid nineties. Latency may have been conquered, but bandwidth was very much a problem back then. We had our our, what, 28 k modems? 56 k if you were lucky. You could not be transmitting audio files or video. Never mind the issues of browser makers actually agreeing on a format that they could all play.

That's a whole another story. But there was kind of a way around it, thanks to an ingenious format, another way of transmission. There's a format called ABC. It was invented in, yeah, early nineties by Chris Walshaw, and it's a text format. It's just plain ASCII text. Looks something like this. And what you're doing is you're literally writing down the notes of music, of a tune.

Now whether it's uppercase or lowercase, denotes different octaves. You can put numbers after notes to indicate how long they should be played, but you can effectively encode quite a lot of information into this text format which could then be converted into another format like sheet music. This is a piece of sheet music from that book that Francis O'Neill put together in the nineteenth century, and there's kind of parity in the amount of information contained in both formats.

So the idea with a b c format was that if you were having a Usenet discussion, ask your parents, you could send an ABC file. Right? And it's nice and small. It's just ASCII text that transmits fine. And someone at the other end might have a piece of software that can convert that ABC file into sheet music or audio.

They might turn it into a MIDI file for example. So this was how I was going to manage to combine my two interests of the World Wide Web and traditionalized music. I made a website. I made a website called The Session, and the idea was every week I'd put a new tune online in ABC. I would also convert it into sheet music, and just keep doing this every week, putting out a new tune.

It didn't even have its own domain name back then. It was on some free hosting thing, kind of like GeoCities, you know that kind of thing. So back then, the formats needed for this website were basically, well, HTML pages. Okay. This ABC format. And this format that's spelled g I f, that was what I was using for displaying the images on this website.

And, it was kind of successful, but there was a built in time limit, was I only know so many tunes. But it was picking up a bit of fan base. So I did a big redesign in 2001, and I got it its own domain name, thesession.org, And the big overhaul was kind of behind the scenes, which was that now other people could add tunes.

You submitted a tune in ABC format. I was still a bottleneck because I need to convert it into the image format spelled g I f, but it was became this community website. It's behind... The big work is behind the scenes. It's like a classic LAMP stack. Right? It's MySQL database, Apache, da da da. And there's other sections on-site too.

You can add sessions that happen near you. You can have discussions about the music. But ultimately, front end technologies were still pretty much the same. HTML, ABC, and this image format that's spelled g I f. Because I wanted transparency and back then, if you wanted transparency in an image format, that was your only option.

PNG did not exist at this point. So the site kind of stayed like this for a long time. I say it growing and growing in terms of the community and the number of tunes, but it didn't really get a big overhaul until 2012, when I decided to do a big redesign and and bring it up to speed.

And by this time, things really had changed a lot in terms of front end technology. So this is the 2012 redesign, and this is also how it looks today. It really hasn't changed that much. It's not that I haven't touched it. I've made lots of changes, but they've been incremental changes rather than a big overhaul. Right? And maybe the biggest difference is that now when you go to look at a tune, you get this beautiful crisp sheet music and nice transparency. And that is possible thanks to SVG, our scalable vector graphics, which honestly, I I remember I couldn't believe it was actually going to become a reality.

Let me put it that way. Like if you told me... If you told my 2,001 self that this this format would exist in the future, I would have thought it was fantasy. I remember being at web conferences like as late as 2005, 2006, and there would always be that one person on the stage telling us about this this technology that's going to be supported in web browsers. It's called SVG and it'll be like flash, but it'll also be a text format that you could actually edit its markup.

And it sounded amazing, but also sounded like a pipe dream. And then it started actually landing in browsers. And now we just take it for granted. It's like, oh yeah, SVG. That's a thing we have. SVG is fantastic. And the magic for me on my particular website was this JavaScript library called ABC JS. So this comes in at three sixty six kilobytes, the version I'm using now, which is not nothing.

That's uncompressed. But what it does, I think, is just amazing where it can take something in ABC format and convert it to SVG on the fly in the web browser using JavaScript. This blew my mind when I first came across it. So what that means is you can land on the page. You can view the tune in this ABC format, just text, but you hit that sheet music button and boom, we can convert it to beautiful crisp SVG instantly.

This was the biggest technological change to happen to the site. Later on I changed it, so instead of happening on click, decided, oh, it'll happen on load. So like you hit the page, and it's going to convert that ABC into SVG, which is fine. That was okay on most pages. But some of these tunes have lots of different versions.

I mentioned that thanks to the oral tradition, there's plenty of variations. So in the particularly common popular tunes, you might have lots of settings. You might have more than 20. You might have 30. And so if I'm doing all this conversion from ABC into SVG on page load, I've got myself a JavaScript bottleneck. Okay. It wasn't happening on every page, just the ones with lots of settings. But of course, by their nature, those are the really popular pages. Right? So the way I got around this JavaScript bottleneck was I decided to cache and embed the SVG.

When I say cache, mean on the server now. So the first person that hits that page has to do the JavaScript to convert it to SVG. But then I immediately grab that SVG, stick it into a folder on the server, and then the next time I'm putting the page together for the next visitor, it's already there. I don't need to use the JavaScript.

I just grab it from the server straight away, which is fine. But now I've got a whole lot of SVG embedded into my HTML, which means I've swapped my JavaScript bottleneck for a DOM bottleneck because these really popular tunes with lots and lots of settings now have 20 to 30 SVG files embedded in them. You know, quite complex.

But I will take it because believe me, if you have a choice between having a JavaScript bottleneck and an HTML bottleneck, Take the HTML bottleneck every time. And we heard Alex talk about this earlier. This is what browsers are optimized for. I mean, browsers will just get better and better at parsing and rendering HTML. It's what they do.

Sticking JavaScript in between, you can optimize it but it's never going to be as fast. Something else that changed a lot in the intervening years between those two versions was maps. Maps on the web and on this website. Back in 2001, a map was just an image same as anything else. It was static.

Then we got Ajax happening around 2005, 2006, and maps changed. We got our Slippy Maps. We got Google Maps. Right? And we got a Google Maps API, By the way, I don't think Adrian is here now. Adrian was here yesterday, Adrian Holovatti. But you have him to thank for the fact that there is a Google Maps API.

There's quite a story there. He basically reversed engineered the requests that Google Maps were making to the server for the Ajax. Anyway, maps suddenly became this dynamic Ajax y thing. Right? Slippy maps. And I wanted this on my website. To do that, I'm going to need third party code. There's no way around it. I'm going to need to have something to make those maps.

Now I decided on Leaflet, which is a nice little library. Say little, it's 148 k. Again, that's not nothing. But it's good. It's a really nice mapping library. So here's an example of using leaflet to display a map showing a session. Over time, mapping libraries got even better.

So then I could display maps with beautiful crisp vector formats rather than just bitmaps. But if I want this kind of map, I need a different library. In this case, it's MapLibraGL, and that comes in at eight zero three kilobytes uncompressed. And this is where I get uncomfortable. I'm like, feels like a lot.

I'm not sure I'm comfortable making my users download that before they can even see a map. So I was thinking about it, and I was thinking, what if I could distinguish between the first time visits, cold cache, someone's hitting this page for the first time, and return visits. Someone's been here already, and maybe they've cached stuff.

Then I might have different strategies. I might show the leaflet map to the first time visitors, but show the map Libra map to the return visitors. Well this is entirely possible, and it's entirely possible thanks to service workers, which we heard about earlier today from Aleph. Yes. Thank you, Jason, for the plug earlier.

I did write a book about service workers a few years ago called Going Offline, which you can read for free. Goingoffline.adactio.com. Read the whole thing. And the reason I called the book Going Offline is because back then, I figured like that was the killer feature of service workers. That once someone had visited your website and the service worker's been installed, that they could visit your website even if they didn't have an internet connection, even if they were offline or your website was down. And sure enough, on the session.org, I do have an offline page, and it's got a fairly simple recipe that I outline in the book where it says, oh, sorry, you're offline.

But hey, these are pages you've already visited, and you can revisit them now again, and you don't need an internet connection to view them. And that's all good. The cache API is actually, I think, as important as the service worker, maybe more important. It's the combination of these two technologies that really makes the magic happen. So first of all, the cache API, what you should definitely be doing with a service worker is caching all your assets in there. Your style sheets, your JavaScript, like in my case, these are libraries I'm using like a b c j s, leaflet j s, or maybe I cache the big one, the MapLibre library.

This is all happening off the main thread. This isn't stopping any user from interacting with the page. All right. So just, you know, I'm kind of repeating what other people have said at this conference. It's like, you should do this. You should use the cache API and service worker for performance. But what I think is actually just as important is that the cache API is not just for service worker.

You can interrogate the cache API from your regular scripts. You don't have to restrict it to your service worker. That's powerful. That means I can say in my regular script, hey, is there a copy of this JavaScript library in the cache? And then based on the answer, yes or no, I can make decisions. This is where the cache API differs from the regular browser API. When you put stuff in the regular browser API, you are hoping that it gets cached.

You have no way to know. You can't interrogate the browser cache. You can't ask, is this file in the browser cache? You can interrogate the cache API. So I can ask, has this file been cached in this particular cache that I named in my service worker? And based on the answer, the answer might be, nope, that file does not exist. Fine.

I'll just show you the leaflet map. But if the answer is yes, okay. You get the fancy map and you don't wait for this library to download. It's already been downloaded. I'm taking it straight from the cache. No waiting involved. You should definitely be caching your JavaScript. When you think about how JavaScript normally ends up being given to user, I can't believe I'm about to mansplain how JavaScript works in web browsers to this audience when like the people who make web browsers are watching me.

This is embarrassing, but, as I understand it, when you make... Request a JavaScript file, it's got it down. Okay. Even that's being too simplistic. Streaming and tokenization should be the first step. But let's call it download. Then it needs to be parsed. Then it needs to be turned into byte code. And then finally, it's executed. Right? If you've stored it in the cache API using a service worker, it's already done those first three steps, and it won't ever need to do them again.

What I mean is it is stored as byte code in the cache. So if you do nothing else with the service worker cache API, store your JavaScript. It's true. So this was really key. This really did allow me to distinguish between first time visits and return visits. And I don't mean in a guessing way.

I could literally say, has this file been put into a cache? If so, do this. If not, do that. So this is so crucial that when I come across people who claim to be, optimizing for return visits, That's the reason why they built, for example, a single page app using a rather large JavaScript library. I'll say, oh, you're optimizing for return visits.

That's great. What's your service worker strategy? And then they turn out that they don't even have a service worker? I'm confused. Like you you claim to be optimizing for return visits, and yet here's this technology you could be using to actually optimize for return visits, and you're not using it. It's almost as if your your justification for building that single page app using a rather bloated JavaScript library retroactive and not really user centered at all, but more around what you as a developer want to use.

Now something else that changed, in those intervening years, Fonts. Fonts on the web. When I first launched the session.org in 2,001, I had my choice of system fonts. I went with Arial in this case. Verdana would have been a choice. That was pretty much it for sans serif fonts.

So when I relaunched in 2012, what did I do? Because web fonts were available now. And since about 2010, we got WAF. We services like Typekit, Google Fonts. So in 2012, I went with Georgia. I stuck with a system font. And partly... Okay. I mean, first of all, Georgia's a good font.

Like Georgia is designed for the screen. There's absolutely nothing wrong with it. I kinda like it. I wasn't averse to having a web font, but I wanted it to be just the right web font. I ended up using a web font on the session in 2026, this year. This is the year I actually finally decided to do it. And like I say, partly it's because I was searching for just the right typeface, but also I was paranoid.

I was paranoid about how the font loading could affect the user experience. I am talking, of course, about cumulative layout shift. Now I'm going to play you a video here, and this is from a a fairly popular, English comedy show that is aimed at a general audience. My specialty. The guy who moves things at the last second so that people click on the wrong stuff online.

Okay. She's about to click. Standby.

Standing by.

She's hovering. She's hovering. And... Budget. Buy something. I believe this is what in the comedy world is referred to as relatable comedy. You will notice that nobody is talking about cumulative layout shift. They certainly aren't using any initialisms or acronyms which I gotta say, god you people love your initialisms and acronyms, but the experience being described here is something that regular folk can relate to.

So this was the reason why I resisted for a long time having a web font. But I finally did it. This is the website as it looks today using the beautiful typeface, Laura. It's a variable font designed by Alexey Vanjaschen and Olga Karpushina. So this is how it's looking now. This is how it was looking before. That's Georgia. That's Laura.

That's Georgia. That's Laura. Okay. It's not a huge change but that is kind of the idea. My my cumulative layout, it does not shift is the idea. And really, the thing that convinced me now was the time to do was that we have in CSS very fine grain control over the font metrics. So this is the technique I'm using.

You could do it different. You could you could adjust the font metrics of the web font. In my case, I'm adjusting the font metrics of the fallback font. It's Georgia that I'm adjusting here, to match the metrics of the the web font. You don't need to figure out what these numbers are. Somebody has already done it for you.

That somebody is Katie Hempenius from Google, who's basically gone through every single font on Google Fonts and figured out all the adjustments you need for the font metrics. Also in CSS, now we have font display. That did not exist when web fonts were first on the scene in 2010. I've gone for fallback. Actually, initially, I went for optional, which is pretty hardcore.

But I settled on fallback. And the other thing, I mentioned it's a it's a variable font, which is great. It means I don't have to download multiple weights, but it is fairly large in file size. So the final step I took was subsetting the font. The font file I prioritize downloading is the one that's got the most commonly used characters in it, the Western alphabet, numbers, stuff like that. And then there's a separate font file with everything else.

And browsers are smart enough that they're not going to download that font file until they hit a character that it uses, needs that font file. So it's a combination of all these things, that made me decide, okay, I could do it. However, if I saw any change in particularly cumulative layout shift, any adverse change, I was ready to rip it out.

Like I said, was absolutely paranoid about this. So I kept an eye on my Core Web Vitals, and again, let's just stop with the acronyms here. You do realize it takes longer to say CWV than it does to say Core Web Vitals. Okay. Let's just stop it with the initialisms. Here's an unavoidable, acronym, CRUX, I guess, the Chrome User Experience Report, which is how I keep an eye on Chrome Web Vitals.

Always bearing in mind that it's only a subset of the audience I'm looking at here. Right? This is only Chrome users. It's not all my users. But it does allow me to keep an eye on cumulative layout shift in particular. And like I said, if I had seen that number change, I was ready to rip out the web font.

But it didn't change. So, the web font stays. Yay, says Jason. One thing I like about Core Web Vitals is like it doesn't have to be just your website you look at. Right? You can look at the competition, or any website. This is Core Web Vitals of Wikipedia. And you can see how many navigations they have.

How the back backwards forward caches work in there. Pretty typical numbers these, about 25% backwards forward cache. This is BBC. Similar, a little less on the backwards forwards cache, but not bad. If we look at the session.org, we see, yeah, similar for backwards forward cache. A lot fewer navigations, but oh my goodness, a whole lot of prerenderings. And this is where Tim has totally stolen my thunder because he... I'm using exactly the same trick that...

It's not a trick. The technique. I'm using the same technique that Tim is using, which is speculation rules. Yes, speculation rules rules. Currently, only supported in Chrome, and remember Core Web Vitals is only showing me core Chrome users. So the numbers are obviously skewed there. Every every browser in Core Web Vitals supports speculation rules.

Right? Because they're all Chrome. But it's it's a great little format. Right? It's a JSON file. I stick in the root of my, server, and I tell it what to prefetch, what to prerender, the different eagerness. Barry told me to do this, so I did this, and it works great. Like what can I say, 35% prerendering is happening?

It's fantastic. It's so funny if you go to look at like, you look up documentation on web.dev and other places about using speculation rules and say, oh, be careful in case you're using links that log people out or links that delete things. If you're using links for those, you have got bigger problems. Knowing the difference between a GET request and a POST request is day one. So yeah.

There's been a lot of technological changes over the years with this website. It's been online now for twenty five years and it's you know, at at at its current domain. And I've seen so many fantastic technologies, get incorporated into web browsers that I can then use. Like you know, Scott was talking about, on the first day, he was saying, could be better for performance than taking all these patterns that we keep doing ourselves and putting it into the web browser so we don't have to do them, and let the web browser do the work. And that's that's what I see over and over again, and I love when that happens.

I haven't even talked about view transitions, cross document view transitions. I was able to rip out some JavaScript code I had written to do Ajax y transitions on some pages just because I wanted that nice animation. It was a great feeling to rip out code and say, hey, browser, you take care of it. Cross document view transitions should be a nail in the coffin for single page apps and you know, one day even Firefox might support it. That's mean.

You'll notice here like, I'm talking about these great technologies that I've arrived in browsers and I've evaluated and I've decided whether to use them or not. I haven't mentioned tools. I haven't mentioned like different design tools because the cars over the last twenty five years, those have changed. We went from Photoshop to Figma to all these other ones.

And I haven't mentioned libraries or frameworks. Right? Whether it's jQuery or Angular or React. Yeah. Because those things come and go. Frameworks come and go. Web standards come and stay. That's the great thing that once they arrive, they're here and you can rely on them. And I I usually when I'm I'm you know giving talks or writing, it tends to be about these technologies.

I mentioned I wrote a book about service workers because that was a technology I thought was really cool, and before that I wrote about HTML five. Jason was talking about that. Even before that I wrote about Ajax way back in the day, and before that I was talking about this technology called JavaScript and trying to convince people it was really cool and we should use more JavaScript. That that backfired.

Looking looking back on this, like I... So every couple of years, I was writing a new book about a specific technology, and I thought like, what's the commonality? What what what connects them? Like forget about the technologies and think about how you approach using the technologies. And I ended up wrapping all of that up into a self published book that I just put on the web called Resilient Web Design, which you just go to resilientwebdesign.com and now you've got the book because it's a web book.

It's also a progressive web app, so now you've just downloaded the whole book. And what I what I do in there is I try to write an evergreen book that isn't technology specific, but is about how you approach using it. And I boiled it down to three steps. Step one is you identify the core functionality you want.

Step two is you make that functionality available using the simplest possible technology, which is usually HTML. And step three is then you enhance. Right? And this approach works at different scales. So if you're looking at a component, you can apply this three step approach. Or if you're looking at an entire website or web app, you can apply this three step approach.

Identify what the core functionality is. Not every functionality, just the core functionality. Make it available using the simplest technology, usually HTML. You'd be surprised how far you can get with HTML. And then crucially, the third step, and this is where the fun is, you enhance. And because you're doing this as the third step, it's okay if the technology isn't supported in every browser.

Right? You can enhance with a clear conscience. The eagle nosed among you will be saying, smells like progressive enhancement to me, and you'll be absolutely right. That's what I'm talking about here. It's progressive enhancement. And again, I am just repeating what others have said. Use progressive enhancement. That's like for my lessons of the first twenty five years of building the session.org, that would kind of be one of my takeaways.

And as I look to the next twenty five years of this site, and I do fully expect it to be online in twenty five years, that's the technique that I'm going to be taking with me. I have to say so, I did manage to combine these two interests that I wanted, right, in early nineties. The World Wide Web and traditional Irish music, I managed to put them together into this thing.

And it's funny, my relationship to the website kind of changed over time too. Where it began, it was kind of this side thing, thing on the side, and the web stuff was like my day job, and it's like the the more... The bigger, more important thing. And over time that relationship shifted, and now I think that the traditional Irish music work on the session.org is actually my life's work.

And all the stuff from the World Wide Web and the speaking at conferences and writing books and client work, that's just a day job. That's flipping the burgers. It's really nice to have kind of my foot in these two time scales That on the scale of the World Wide Web, I really care about the time to get something onto the screen, the user interacting with something.

We're talking like milliseconds. Right? That's the world we inhabit, web performance. But to also be part of this thing that's bigger and longer, that thinks in terms of decades and centuries and generations, it's very gratifying for me to be able to combine those things. And I very rarely get the chance to talk about it.

So I want to say, well, first of all, a big thank you to Tammy, and Harry, and Tim, and PPK, for whatever clerical error led to me being allowed to get up here and talk about this. But most especially, I want to thank you very much for indulging me and listening to me talk. So thank you very much indeed.

Long-term performance

A satellite view shows the island of Ireland and the surrounding waters.

traditional Irish music

A satellite view shows the island of Ireland.

A satellite view shows the island of Ireland.

  • jigs
  • reels
  • hornpipes
  • slip jigs

The satellite view of Ireland stays in place as the slide introduces four traditional Irish dance tune types. Jigs appear first, followed by reels, hornpipes, and slip jigs. All four remain visible at the end.

  • fiddle
  • pipes
  • concertina
  • accordion

The satellite view of Ireland stays in place as the slide introduces instruments used to play traditional Irish tunes. Fiddle and pipes appear together, followed by concertina and then accordion.

an aural tradition

A satellite view shows the island of Ireland.

O’Neill’s Music of Ireland

Eighteen Hundred and Fifty Melodies.

The open book shows a portrait of Francis O’Neill in police uniform alongside the title page of the 1903 collection.

Medley of Jigs

Michael Coleman, accompanied by Michael Andrews on guitar

A Decca gramophone record label identifies the performance as violin with guitar accompaniment.

A historical photograph shows people holding hands and dancing at a rural crossroads while a seated musician plays an accordion.

At an Irish music session in Mulligans in Amsterdam, musicians play fiddle, guitar, flute, and banjo around a pub table.

latency

transmission & latency

An illustration of the Battle of New Orleans shows ranks of soldiers facing one another across an open field near a river, with smoke rising from the fighting.

telegraph

A portrait shows Samuel Morse holding a wire attached to a telegraph apparatus.

telegraph

A portrait shows Samuel Morse holding a wire attached to a telegraph apparatus.

  • telephone
  • telegraph

A portrait shows Samuel Morse holding a wire attached to a telegraph apparatus.

  • internet
  • telephone
  • telegraph

A portrait shows Samuel Morse holding a wire attached to a telegraph apparatus.

  • World Wide Web
  • internet
  • telephone
  • telegraph

A portrait shows Samuel Morse holding a wire attached to a telegraph apparatus.

World Wide Web & traditional Irish music

bandwidth

World Wide Web

ABC

|:B|c3 edc|edc BAG|ABA gze|eaa ged|c3 edc|edc deg|age dBe|ABA A2:|
|:f|g3 gea|age edB|ABA gze|aba ge^f|g3 gea|age e^fg|age dBe|ABA A2:|
|:B|c2c d2d|ecA AGE|c2c d2d|ecA A2B|c2c d2d|e2e ^gab|a=ge dBe|ABA A2:|

ABC

|:B|c3 edc|edc BAG|ABA gze|eaa ged|c3 edc|edc deg|age dBe|ABA A2:|
|:f|g3 gea|age edB|ABA gze|aba ge^f|g3 gea|age e^fg|age dBe|ABA A2:|
|:B|c2c d2d|ecA AGE|c2c d2d|ecA A2B|c2c d2d|e2e ^gab|a=ge dBe|ABA A2:|

The Pipe on the Hob

Printed sheet music for “The Pipe on the Hob” shows the tune in staff notation for comparison with the ABC transcription.

Welcome to The Session

December 14 2000

An early homepage introduces The Session as a way to share traditional Irish dance tunes. Its featured tune is “The snowy path,” a slip jig.

  • .html
  • .abc
  • .gif

2001

thesession.org

Welcome to The Session

Join The Session

The redesigned homepage invites members to submit tunes and recordings, comment on them, and keep a personal tunebook.

Cooley’s (reel)

Sheetmusic

The tune page on The Session displays Cooley’s reel in staff notation. A separate ABC tab is available for the same tune.

2012

The Session

Fáilte, Jeremy

The redesigned homepage shows a tune search and links for exploring sessions, events, discussions, and recordings. The signed-in view also shows Jeremy’s upcoming trip to Sligo Town.

Twenty-five settings

A tune page on The Session shows the first setting in the Sheet Music tab. The SVG score spans four lines of staff notation, with controls to play the audio or print the score.

SVG!

abcjs

(366KB)

JavaScript

.abc → .svg

An arrow shows JavaScript converting ABC tune notation into an SVG score in the browser.

Sheet Music

The Session’s Sheet Music tab displays a tune in 6/8 as a six-line score. Selecting this tab triggers the conversion from ABC to SVG.

onclick → onload

The arrow shows the trigger for sheet music conversion changing from a click to page load.

Twenty-five settings

A tune page on The Session shows the first of 25 versions as sheet music. The number of settings illustrates how much ABC-to-SVG conversion a single page can require when it loads.

JavaScript bottleneck

cache & embed the SVG

DOM bottleneck

maps

Mulligan’s Irish Music Bar

Amstel 100, Amsterdam, Noord-Holland, Netherlands

The Session’s venue page shows a Leaflet map made from raster tiles. A pin marks the bar on the Amstel, and plus and minus controls let visitors zoom.

Mulligan’s Irish Music Bar

Amstel 100, Amsterdam, Noord-Holland, Netherlands

The same venue page shows a vector map rendered with MapLibre GL. The pin still marks the bar on the Amstel, and nearby landmarks include the Dancing Houses and Rembrandtplein.

maplibre-gl

(803KB)

first visit & return visits

service worker

service worker

The cover of Going Offline by Jeremy Keith accompanies the slide’s introduction to service workers.

service worker

Offline

The Session’s fallback page reports a connection problem and links to previously visited pages available offline, including Cooley’s, The Pipe On The Hob, and Mulligan’s Irish Music Bar.

cache API

service worker

cache API

  • styles.css
  • scripts.js
  • abcjs.js
  • leaflet.js
  • maplibre-gl.js

cache API

not just for service worker!

cache API

maplibre-gl.js?

Mulligan’s Irish Music Bar

The Session’s venue page displays the vector map with a pin at the bar. This is the result when the site finds maplibre-gl.js in the cache and can use it immediately.

JavaScript

JavaScript

  1. download
  2. parse
  3. generate bytecode

JavaScript

cache API

  1. download
  2. parse
  3. generate bytecode
  4. execute

The slide crosses out download, parse, and generate bytecode to illustrate the work caching can save. Execute remains.

first visit & return visits

OUR SINGLE PAGE APP PRIORITISES RETURN VISITS

SO YOU’RE USING A SERVICE WORKER?

In a three-panel meme, one man makes the claim, another asks about the service worker, and the first man squints in silence.

fonts

2001

Welcome to The Session

The original homepage introduces The Session as a place to share traditional Irish dance tunes. A sign-up section invites members to contribute tunes, recordings, and comments and to keep a personal tunebook.

2012

Fáilte, Jeremy

The redesigned Session homepage shows the signed-in view, with a tune search and a reminder for Jeremy’s upcoming trip to Sligo Town.

2026

In a comedy sketch about web pages shifting just before a click, a team in a control room watches a wall of monitors and stands by as someone is about to click.

The Evening News

A control-room monitor shows a woman alongside the mobile news page she is browsing. A story about lion’s mane mushrooms appears above furniture ads, setting up the sketch’s joke about a last-second shift sending a click to the wrong place.

Back in the control room, two operators raise their fists in celebration while a seated colleague covers his mouth. Their reaction follows the sketch’s last-second page shift.

Fáilte

The demo switches The Session’s public homepage from Lora to Georgia and back to Lora. The search form, paragraphs, and featured event stay in essentially the same positions, showing how the site can swap in the web font with minimal layout shift.

@font-face {
    font-family: 'Fallback for Lora';
    src: local('Georgia');
    size-adjust: 105.77%;
    ascent-override: 95.11%;
    descent-override: 25.9%;
}
body {
    font-family: Lora,
    'Fallback for Lora', serif;
}
@font-face {
    font-family: Lora;
    font-display: fallback;
}
@font-face {
    font-family: Lora;
    font-display: fallback;
    src: url('subset.woff2')
    format('woff2');
    unicode-range: U+000D,
    U+0020-007E, …
}

core web vitals

CRUX

Core Web Vitals Assessment

thesession.org passes. Overall UX rating: 92.

All three metrics are rated good at the 75th percentile. Largest Contentful Paint is 946 ms, Cumulative Layout Shift is 0.00, and Interaction to Next Paint is 95 ms.

Last 28 days

Back Forward Cache: 24.5%

The chart breaks down navigation types across all device types. Standard navigation accounts for 69.0% of visits, and the back-forward cache accounts for nearly a quarter. Reloads account for 2.2%, back-forward navigation without a cache hit for 2.0%, cached navigation for 1.8%, prerendering for 0.4%, and restores for 0.2%.

speculation rules

{
  "prefetch": [{
    "where": {
      "and": [
        { "href_matches": "/*" }
      ]
    },
    "eagerness": "eager"
  }],
  "prerender": [{
    "where": {
      "and": [
        { "href_matches": "/*" }
      ]
    },
    "eagerness": "moderate"
  }]
}

2001 → 2026

  • SVG
  • service worker
  • speculation rules
  • web fonts
  • web components
  • view transitions

The sequence starts with SVG and adds each technology in turn, ending with six examples of browser capabilities that became available over The Session’s first 25 years.

  • Going Offline
  • HTML5 for Web Designers
  • Bulletproof Ajax
  • DOM Scripting

Four book covers show Jeremy Keith’s work on service workers, HTML5, Ajax, and JavaScript. The HTML5 book also credits Rachel Andrew.

Resilient web design

by Jeremy Keith

  1. Identify core functionality.
  2. Make that functionality available using the simplest possible technology.
  3. Enhance!

2001 → 2026 →

The timeline runs from 2001 to 2026, then points onward to The Session’s future.

World Wide Web & traditional Irish music

Thank you

People

  • Francis O’Neill
  • Samuel Morse
  • Chris Walshaw
  • Adrian Holovaty

Technologies & Tools

  • Telegraph
  • World Wide Web
  • Usenet
  • LAMP stack
  • JavaScript
  • abcjs
  • Google Maps API
  • Leaflet
  • MapLibre GL JS
  • Lora
  • Variable fonts
  • CrUX

Standards & Specs

  • HTML5
  • Morse code
  • ABC notation
  • ASCII
  • MIDI
  • HTML
  • GIF
  • SVG
  • DOM
  • Service Worker API
  • Cache API
  • font-display
  • Speculation Rules API
  • Cross-document view transitions

Concepts & Methods

  • Oral tradition
  • Latency
  • Battle of New Orleans
  • Ajax
  • Cumulative Layout Shift
  • Core Web Vitals
  • Progressive enhancement

Organisations & Products

  • The Session

Works

  • Treaty of Ghent
  • Going Offline
  • Resilient Web Design