Menu

I asked a chat app for a caching diagram. It drew the 304 as a 204.
📰

I asked a chat app for a caching diagram. It drew the 304 as a 204.

DEV Community: api·Kai Mercer·12 days ago
#jlRJmbrT
#devtoapi#devto#dev#prompt#picture
Reading 0:00
15s threshold

Quick note first: I do marketing for HelloAI (tryhello.app), and this is a test I ran on its free plan. I'll show the prompt, the picture it gave me, and where it slipped.

The prompt, word for word:

Make an image: a simple sequence diagram of HTTP conditional caching. Two lanes only: Browser and Server. Four numbered arrows with SHORT labels: 1 GET /logo.png, 2 200 OK + ETag, 3 GET with If-None-Match, 4 304 Not Modified (no body). Large legible text, minimal words, flat style.

It took about a minute and returned one image (1536x1024):

What is right

The flow is the standard revalidation round trip. The browser asks for a file, the server answers 200 with an ETag, the browser asks again with If-None-Match , and the server answers 304 with no body. MDN's 304 page describes exactly this: it is sent for a conditional GET or HEAD with If-None-Match or If-Modified-Since when the condition is false, and it must not contain a body.…

Continue reading — create a free account

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