Microsoft Edge Sleeping Tabs Issues — What It Means & How to Fix It
About Microsoft Edge Sleeping Tabs Issues
Fix Microsoft Edge sleeping tabs feature causing web apps to lose state, disconnect WebSockets, or fail to receive notifications. This guide covers everything you need to know about this topic, including common causes, step-by-step solutions, and answers to frequently asked questions.
Here are the key things to understand: Edge's sleeping tabs feature puts inactive tabs to sleep after a configurable timeout (default 2 hours). Sleeping tabs are unloaded from memory, stopping all JavaScript execution and network connections. When reactivated, the page reloads from scratch, losing any unsaved state or active connections. This affects web applications that need persistent connections like chat apps, dashboards, or collaboration tools. Understanding these fundamentals will help you diagnose and resolve this issue more effectively.
The most common reasons this occurs include: Tab was inactive for longer than Edge's sleep timeout (default 2 hours, can be as short as 5 minutes). Web application does not use the Page Lifecycle API to save state before being frozen. WebSocket or Server-Sent Events connections dropped when the tab was put to sleep. Background sync or push notifications not implemented to recover from sleep. Identifying the root cause is the first step toward finding the right solution.
To resolve this, follow these recommended steps: Add exceptions for important sites: Edge Settings > System and Performance > Never put these sites to sleep. Increase the sleep timeout: Edge Settings > System and Performance > Put inactive tabs to sleep after > select longer duration. For developers: use the Page Lifecycle API's freeze event to save state: document.addEventListener('freeze', saveState). Implement reconnection logic in web apps to handle connection drops gracefully on tab reactivation. If these steps do not resolve the issue, consider consulting additional resources or a qualified professional.
This article is part of our Browser Errors collection on Error Codes Wiki. We provide comprehensive, up-to-date information to help you find solutions quickly.
Quick Answer
How do I know if a tab is sleeping?
Sleeping tabs show a faded favicon in the tab bar. Hover over the tab to see 'This tab is sleeping to save resources.' Clicking the tab wakes it up and reloads the page.
Overview
Fix Microsoft Edge sleeping tabs feature causing web apps to lose state, disconnect WebSockets, or fail to receive notifications.
Key Details
- Edge's sleeping tabs feature puts inactive tabs to sleep after a configurable timeout (default 2 hours)
- Sleeping tabs are unloaded from memory, stopping all JavaScript execution and network connections
- When reactivated, the page reloads from scratch, losing any unsaved state or active connections
- This affects web applications that need persistent connections like chat apps, dashboards, or collaboration tools
Common Causes
- Tab was inactive for longer than Edge's sleep timeout (default 2 hours, can be as short as 5 minutes)
- Web application does not use the Page Lifecycle API to save state before being frozen
- WebSocket or Server-Sent Events connections dropped when the tab was put to sleep
- Background sync or push notifications not implemented to recover from sleep
Steps
- 1Add exceptions for important sites: Edge Settings > System and Performance > Never put these sites to sleep
- 2Increase the sleep timeout: Edge Settings > System and Performance > Put inactive tabs to sleep after > select longer duration
- 3For developers: use the Page Lifecycle API's freeze event to save state: document.addEventListener('freeze', saveState)
- 4Implement reconnection logic in web apps to handle connection drops gracefully on tab reactivation