Menu

1 / 2

How Instagram Stories disappear After Exactly 24 Hours ? Who's Counting

DEV Community: backend·Kashaf Abdullah·6 months ago
#imPxv0Om
#dev#time#server#stories#later
Reading 0:00
15s threshold

1. What is happening (core idea)

When you post a story:

Instagram saves the time you posted it

Then it has a rule: show only for 24 hours

So it never "counts time" — it just compares times.

2. Like you're 5 years old

Imagine:

You put a sticker on a board at 10 AM

The rule is: "remove it after 1 day"

Now whenever someone looks at the board:

If sticker is less than 1 day old → show it

If older → don't show it

Nobody is counting seconds. They just check the time.

3. Engineer-level (simple version)

When story is uploaded:

Server stores:

created_at = time of upload

When feed is requested:

Server runs a filter:

if (now - created_at < 24 hours) {

return story;

}

So:

👉 Only fresh stories are returned

👉 Old stories are automatically ignored

4. Important clarification

"The mobile app doesn't decide anything"

Meaning:

Your phone is NOT responsible for hiding stories

Instagram server decides everything

So even if you change your phone time → nothing changes

5.…

Continue reading — create a free account

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