Development

The walks work without signal

Walk 3 goes under a folded concrete roof that blocks every phone signal, and two other walks go through underpasses. So the Register's walks save themselves to the phone when they are opened. How we kept a building page to 38 KB, what saves when, and the 90 KB search index for when nothing else works.

A dark tunnel lit only by a row of arched windows along one side.

In June, Marta mentioned that her phone lost its signal as soon as she stepped under the Accordion's roof. We went to check. She was right: the bus station's folded concrete roof is about thirty centimetres thick, and under it there is no signal at all. Not one bar. The bus timetables inside are on paper for exactly this reason.

Walk 3, the Quays, stops under that roof. Walks 5 and 9 go through underpasses. And a Saturday walk is exactly when people have the Register's website open: standing in front of a building, reading the note, looking at the old photographs. A website that stops working at the most interesting stop is not a website the volunteers would trust.

So the walks had to work without signal.

Small pages first

The first step was making every page small enough that it loads almost anywhere, before thinking about offline at all.

A building page is prerendered: when someone publishes a change, the page is built once, as plain HTML, and served as a file. There is no database to ask when you open it. The page is 38 KB of HTML and CSS, plus the photographs, which are sized for the screen asking for them. On a slow 3G connection it loads in about 1.4 seconds.

Small pages solved the street. They didn't solve the roof.

Saving a walk

When you open a walk, the website quietly saves that walk to your phone: the walk page, every building page on it, the first photograph of each building at your screen's size, and the map. A walk is about 2 MB. By the time you have read the introduction and walked to the first building, it has finished.

Then, if you lose signal under the Accordion, the building page opens from the phone. It says, in small grey letters at the top, saved Saturday at 10:14, so you know you might be a little out of date.

We chose to save the whole walk, rather than the next few buildings, after testing both with Sorcha's Saturday group. People don't walk in order. They cross the road to look at something, double back, skip a stop. With the whole walk saved, it doesn't matter.

Save everything

For the volunteers, and for anyone who wants it, there is a button on the walks page: Save every walk. It saves all twelve walks and their 312 buildings, about 14 MB. Sorcha's whole team has pressed it. So have, according to our numbers, a surprising number of people in other countries planning a trip.

Saved walks update themselves the next time the phone has signal, but only the pages that changed since they were saved. A volunteer fixing a typo doesn't make everyone download 14 MB again.

Search without signal

Search was the hardest part. The real search runs on a server, with nicknames, typo tolerance and descriptions. Without signal, there is no server.

So the phone keeps a small search index of its own: every building's official name, its other names and its street, in a 90 KB file. When you are offline, search uses that instead. It is much simpler: no descriptions, fewer forgiven typos. But "accordion" still finds the bus station under its own roof, which, it turns out, is the one search people make there.

What we left out

Declan's old photographs aren't saved offline, apart from the first one on each building. They are lovely, and they are large, and there are a lot of them. Offline, the page says how many there are and that they will appear when you have signal.

And there is no "you are offline" banner. We tried one. On the walks, it appeared and disappeared every few seconds along the quays, and it made the website feel broken when it was working perfectly. Now the only sign is the small grey date at the top of the page.

How it went

We tested it on Walk 3 with Sorcha's group, in the rain, in September. Thirty people stood under the Accordion's roof reading the bus station's page and Declan's note about the way in. Nobody noticed they had no signal. That was the whole point.

More from the journal

All posts

Small Caps is made up.

The studio, its people, its clients and their 1,912 buildings are invented, to show what a site built on Nohead looks like. The projects, posts, people and images live in a Nohead project; Astro builds the site.

Use this starter

Make it yours

Clone the starter, connect it to your own project, and replace Small Caps with your own story. Publishing a post rebuilds the site.

View on GitHub

What is Nohead?

Design your content model, edit and publish in a shared editor, and read it anywhere through the API and SDKs.

Visit nohead.io