07480 257117 Talk to us

How the TipBop tip page is built to load one thing

The page a stranger sees after tapping a TipBop tag loads no webfont, no framework and no third party but Stripe. We wrote that down as rules, then wrote tests so a later change cannot quietly break them.

41,085 set large on a pale pink background beside a phone showing the TipBop tip page with fixture data: four amounts, the £10 one selected, and a pay button, above the words: Bytes in the one script of our own the tip page runs

Someone points you at a small tag. You tap your phone on it. A page opens, and you are standing in a restaurant with one hand free and a signal you did not choose.

That is the whole brief for TipBop’s tip page. Everything below follows from it. If the page is slow, the customer puts the phone away. A tip that never happens is the only failure that matters here.

The guide on tipbop.com, how a tap becomes a tip, covers the tap itself. This post is about what we left out, and how we made sure it stays out.

The TipBop tip page on a phone, with fixture data: a worker called Amara, four amounts with £10 selected, the line "Amara gets £10.00, £0.80 fee" and a pink Pay £10.80 button.
The done page after a payment: £10.00 in large pink type and the words "Amara got it".
The page this post is about, with fixture data: before the tip, then after.

The page loads one thing that is not ours

The comment at the top of the page shell is blunt. All the CSS is inline, so there is no stylesheet request. There is no webfont and the type is a system stack. The page runs one script from our own address and makes one third-party request, to Stripe, loaded so it cannot block the first paint.

Then comes the line we like best. Nothing else is allowed to be added. Every new request is a tip that did not happen because someone gave up waiting.

1third-party host on the tip page. It is Stripe, because Stripe takes the payment.

The amounts work before Stripe arrives. They are real radio buttons. A screen reader announces them properly, and they respond, before any script has loaded. The middle amount is already selected. Choosing “Other” reveals a field on the same page with CSS alone, not a second page.

Our one script is 41,085 bytes today. That is a number we measured on 17 November, and it will drift. We quote it as a size, not as a speed. Two of our own files state a time target, one saying ten seconds and one saying six. Neither is a measurement, so we do not quote either as a result.

What the brand file gives up on purpose

The brand file says the type is a system stack with no webfont, ever. Its own reason is that a font request is 30 to 80 KB on the critical path, to change the shape of six words.

So the design was drawn to look right in the fonts a phone already has. We did not draw it in a webfont and then try to survive without one. That order matters. It is the difference between a constraint and a compromise.

Two more rules from the same file shape the layout:

Webfontno

A font file is a request on the path to the pay button, to change how six words look.

Frameworkno

One small script of our own does the work. The amounts are plain form controls that need no script to function.

Analytics or pixelsno

Our privacy notes promise this in public. A test holds us to it.

Stripeyes

Stripe takes the payment, so its script has to load. It loads without blocking the page.

The promise that was only prose

The privacy notes say, in plain words, that the tip page carries no analytics. No third-party tracker, no pixel, no fingerprinting, no session replay.

On 10 September a search of the tests found nothing that checked it. That was fine while no analytics tool existed anywhere in the repo. It stopped being fine once a plan to add an analytics tool to another part of the product came up. From then on, the only thing keeping it off the payment page was someone remembering.

So we wrote the test before the tool arrived. It sweeps five surfaces:

It makes three checks on each:

  1. No known analytics host appears in any of them.
  2. No analytics call shape appears, such as a tracker being started or an event being pushed.
  3. Every outside address on those pages is on a short list, which is Stripe, the wallet sheets, the worker’s share link and our own domain.

The third check is the one that catches a vendor nobody here has heard of.

Why the test reads code instead of words

Our first idea was to search the delivered page for the word “analytics” or a vendor’s name. That fails at once, because our privacy page says those words on purpose.

There is a second trap. The security policy already stops a third-party script from loading. But analytics vendors document a way round that: serve their script from your own domain. A script on our own address passes the policy untouched, and the promise breaks while the policy stays green.

So the test looks for how analytics is wired, not what it is called. A hostname, a call such as starting a tracker, or a tracking-pixel shape. Prose can say any word it likes. It cannot start a tracker.

There is a deliberate edge here. The information pages on tipbop.com, such as the home page and the questions page, do carry visit statistics, behind a banner with a one-click reject. The tip page, the confirmation and receipt pages and the worker app do not, and the test sweeps only the pages where a person pays. A guard that fires on pages it was never meant to guard gets deleted, so we kept it narrow.

The privacy notes give a second reason too. Once a cookie that is not strictly needed exists, a consent banner has to exist too. A banner is one more step between the customer’s impulse and the money.

Until someone times the page on a poor connection, ten seconds stays a design target. We will print it as a result only after we have measured it.