Reading Time: 2 minutes

I have put a small experiment online: a single whiteboard that everyone shares. Open the page, draw or type something, and anyone else looking at it sees it appear straight away. There is nothing to install and no account to create.

Try it here: whiteboard.mayhew.me.uk

What you can do

  • Draw with a pen in six colours and a range of sizes.
  • Type text anywhere on the board.
  • Rub things out with the eraser, or undo your own last addition.
  • Save a picture of the board to your own device.
  • Wipe the whole board for everyone (it asks you to click twice).
  • See how many connections are on the board right now.

It works with a mouse, a finger or a stylus. On a phone, turn it sideways for more room.

How it works

The page is plain HTML, CSS and JavaScript, hosted on Cloudflare Pages. Behind it is one Cloudflare Durable Object, which holds the board and passes each change to everyone connected over a WebSocket. When nobody is doing anything it can go to sleep without dropping those connections.

The board is stored as a list of strokes and pieces of text rather than as one large image, so each change is small to send. Lines are shared while they are still being drawn, which is why you can watch someone else's handwriting appear. It keeps the most recent 4,000 items.

Because anyone can connect, the server does not trust what it is sent. It checks the shape and size of every item, limits how quickly messages can arrive, and refuses connections made from other websites. Typed text is painted onto the board as text and is never run as part of the page.

Before you scribble

This is a public wall. Anyone can see what you add and can save a copy of it, so please do not put anything private on it, and be kind to whoever looks next.

← All articles

Related articles