◉RORK LABJP
●GPT-6.1 SOL — Added to Rork's model menu (09-29) with Low, Medium and High effort; included on Pro and Max●SONNET 5.5 — Claude Sonnet 5.5 is selectable: strong at UI design and faster than Sonnet 5 (09-28)●SONNET 4.5 — Retires on the Claude API on 11/30, 32 days left. If your app calls it, check the migration target●SDK 58 ISSUE — Early reports include Android widgets not refreshing on a schedule and Stripe linking statically●OBSERVE — EAS Observe now records native crashes too (SDK 57.0.21 or later, 10/07)●NEW — My App Open Ad Only Showed When the App…●GPT-6.1 SOL — Added to Rork's model menu (09-29) with Low, Medium and High effort; included on Pro and Max●SONNET 5.5 — Claude Sonnet 5.5 is selectable: strong at UI design and faster than Sonnet 5 (09-28)●SONNET 4.5 — Retires on the Claude API on 11/30, 32 days left. If your app calls it, check the migration target●SDK 58 ISSUE — Early reports include Android widgets not refreshing on a schedule and Stripe linking statically●OBSERVE — EAS Observe now records native crashes too (SDK 57.0.21 or later, 10/07)●NEW — My App Open Ad Only Showed When the App…
Articles/App Dev
◇ App Dev/2026-10-29Advanced

An Image Requested Once Before Its Upload Stayed a 404 at the Edge. I Split the Retention Rules by Status Code and Made Upload and Purge a Single Step

A new wallpaper stayed missing in some regions because the CDN kept a 404, fetched once before the upload, as long as it kept the image itself. Per-status retention, a two-request diagnosis, and pairing upload with purge, tested in Node.

CDN3caching4404TTLwallpaper app23indie developer52operations10

✦ Premium Article

I add one wallpaper and refresh the catalog. On my own device it appears right away. From a device in a distant region, that single image stays blank.

The file is on the server. The app code looks fine.

A 404 means "not here yet", not "never will be". A CDN, depending on its settings, will remember it as if it were a promise. That sentence is where I landed after the fix.

This happened in the image delivery of a wallpaper app I run as an indie developer. An Expo app that Rork generates can hit the same shape if it serves images from a remote host, so I rebuilt only the retention rule as a small model in JavaScript and ran it on Node 22. It is not a re-creation of any CDN's internals, and it is separate from checking on a real delivery network. I mark that boundary where it matters.

The report was "just that one image is missing"

Putting the symptoms in a table first makes it harder to suspect things in the wrong order. This is the order I would investigate in, not a record of what I observed on screen.

What you seeWhat to check first
Only new images are missing (old ones load)Look at the response for the image URL before the app's loading code
It works in some regions and not in othersEdge caches are separate. Suspect one region's memory
It does not fix itself over timeLook at how long responses are kept. Find out how many seconds a 404 is remembered
The file is on the originSuspect not "it is missing" but "a memory of it being missing is still there"

Three things that stacked up

There was not one cause. Three stacked up before an image stayed a 404 for as long as a year.

The first was order. The catalog update reached devices first, so there was a moment when a device asked for an image before its upload had finished.

The second was the retention rule. In the CDN settings, a 404 was kept for the same one year as the image itself. A "not found" became a one-year memory.

The third was the purge step. In my workflow, nothing purged the path after an upload. Once the file arrived, the edge already held an answer and never went back to the origin.

✦

Thank you for reading this far.

Continue Reading

What follows includes implementation code, benchmarks, and practical content we hope you'll find useful. This site runs without ads — server and development costs are supported entirely by members like you. If it's been helpful, we'd be truly grateful for your support.

WHAT YOU'LL LEARN
✦You can tell whether a new image is missing from the origin or the edge is holding a 404, using two requests, when it only fails in some regions
✦You can set your own 404 and 5xx retention by counting what a shorter 404 costs (requests reaching the origin) and what a wrongly kept 5xx does, before touching the CDN
✦You can make upload and purge one step, so the next image you add does not fall into the same hole
Secure payment via Stripe · Cancel anytime
✦

Unlock This Article

Get full access to the rest of this article. Buy once, read anytime. This site is ad-free — your support goes directly toward keeping it running.

or
Unlock all articles with Membership →
Share

Thank You for Reading

Rork Lab is ad-free, supported entirely by members like you. We publish practical guides daily with implementation code, benchmarks, and production-ready patterns. If you've found it useful, we'd love to have you on board.

  • ✦Copy-paste ready implementation code
  • ✦New advanced guides published daily
  • ✦$5/mo or $10 for lifetime access
View Membership →

Related Articles

◇ App Dev2026-08-24
I Moved the Thumbnails Assuming the Shipped Build Would Keep Asking for the Old Path
Reorganizing image directories on the server does not reach the builds already installed on people's phones. Here is the two-way fallback that returns 200 for both the old and new paths, the ordering rule for images versus catalog, and the four checks I run through a CDN before calling a release live.
◇ App Dev2026-10-16
301 or Internal Rewrite for Wallpaper Resolution Routing? Inside One Host, I Chose the Route That Doesn't Change the URL
When one host picks an image resolution for you, should it answer with a 301 or rewrite internally? I ran both on nginx and compared round trips, rule-order traps, and a small verification script.
◇ App Dev2026-08-28
Two weeks of half-finished batch runs, and every log line said success
A job scheduled twice a day was firing once, and nothing in the logs showed it. Here is the run ledger that catches executions that never happened, plus a backlog-slope check, with real command output.