Menu

1 / 2

One entry, posted seven times: making an offline queue idempotent

DEV Community: laravel·Matt·4 days ago
#2qYy3X1m
#devtolaravel#devto#dev#entry#queue
Reading 0:00
15s threshold

Most people who keep a log on Boat Build Log write it in a garage, a shed or a boatyard. Signal out there is one bar on a good day. So the site has an offline queue: if you press Post and the request can't get through, the entry and its photos are saved in the browser and sent later, once you're back online.

That queue worked fine for months. Then on 2026-10-27 I posted one entry from the shop and it showed up on my build seven times. Same title, same text, six photos each.

This post is about why that happened, and the two changes that fixed it: a key the server dedupes on, and a Web Lock so only one page drains the queue at a time.

Piece Version

Laravel 13

PHP 8.3+

MySQL 8

Queue storage IndexedDB

Replay guard Web Locks API

How the offline queue works

The composer is a normal Laravel form. A small script, offline.js , hooks it.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.