Microsoft Edge Sleeping Tabs: Does it suspend or wipe HTML5 localStorage for inactive Web Apps?

Nauman Khan 0 Reputation points
2026-07-02T15:08:09.1533333+00:00

Hi everyone,

I am optimizing the frontend state management for a daily browser puzzle I recently launched called Hang Five.

The game is entirely client-side and relies heavily on HTML5 localStorage to save a user's daily progress, remaining lives, and their win streak. Because it is a daily puzzle, many users open the site in the morning, make a few guesses, and leave the tab open in the background to finish later in the evening.

I noticed that Microsoft Edge's "Sleeping Tabs" feature aggressively puts inactive tabs to sleep to save memory.

My questions for the Edge engineering community:

When Edge puts a tab to sleep, does it freeze the JavaScript execution completely, or just throttle the requestAnimationFrame/timers?

More importantly, when the tab "wakes up," is there any known risk of the localStorage state failing to sync properly if the browser cleared memory cache while it was asleep?

I want to make sure Edge users don't lose their puzzle progress if they leave the tab dormant for 8+ hours. Should I implement a custom service worker to handle state recovery, or is standard localStorage safe against the Sleeping Tabs feature?

Thanks in advance for the clarification!

Microsoft Edge | Website issues | Windows 10
0 comments No comments

1 answer

Sort by: Most helpful
  1. Bruce (SqlWork.com) 84,251 Reputation points
    2026-07-02T15:33:42.1833333+00:00

    when a tab is put to sleep, javascript is paused, along with timers. unless the tab is closed memory state is preserved. localstorage is not effected unless the user deletes it, but this is the same effect if the tab was active.

    the main coding effects:

    • timers may take way longer to fire
    • any polling is suspended
    • network events are suspended
    • if using WebSocket you may need to reconnect
    • service workers may be terminated, then reactivated

    Was this answer helpful?

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.