How to Test Offline Mode on Web (Complete Guide)

Testing offline mode on Web apps is crucial to ensure a seamless user experience, even when the internet connection is lost or unreliable. When offline mode is not properly implemented, it can lead to

January 06, 2026 · 3 min read · How-To Guides

Introduction to Offline Mode Testing

Testing offline mode on Web apps is crucial to ensure a seamless user experience, even when the internet connection is lost or unreliable. When offline mode is not properly implemented, it can lead to frustrated users, loss of productivity, and ultimately, a negative impact on the business. Common failures in offline mode testing include data loss, application crashes, and inconsistent behavior.

What to Test in Offline Mode

The following test cases cover various aspects of offline mode testing:

+ Successfully loading a previously accessed page while offline

+ Correctly queuing user inputs (e.g., form submissions) for synchronization when the connection is re-established

+ Displaying a clear and user-friendly offline mode indicator

+ Handling network request failures (e.g., fetching data, sending requests) while offline

+ Preventing data corruption or inconsistencies when the app is used offline

+ Providing a meaningful error message when a user attempts to perform an action that requires an internet connection

+ Testing offline mode with different types of content (e.g., images, videos, audio files)

+ Verifying that offline mode works correctly across different browsers and devices

+ Ensuring that the app can recover from an offline state to an online state without issues

+ Ensuring that screen readers can still navigate the app's content while offline

+ Providing alternative text for images and other non-text content

+ Allowing users to access critical features and information while offline

Examples of test cases:

  1. Offline page loading: Load a page while online, then switch to offline mode and verify that the page is still accessible.
  2. Queued form submissions: Fill out a form while offline, then switch to online mode and verify that the submission is processed correctly.
  3. Offline mode indicator: Verify that the app displays a clear and user-friendly indicator when in offline mode.
  4. Network request failures: Simulate a network request failure while offline and verify that the app handles it correctly.
  5. Data corruption prevention: Perform actions while offline that could potentially cause data corruption, then switch to online mode and verify that the data is consistent.
  6. Error message display: Attempt to perform an action that requires an internet connection while offline and verify that a meaningful error message is displayed.
  7. Content loading: Load different types of content (e.g., images, videos) while offline and verify that they are displayed correctly.
  8. Browser and device compatibility: Test offline mode across different browsers and devices to ensure compatibility.
  9. Recovery from offline state: Switch from offline mode to online mode and verify that the app recovers without issues.
  10. Screen reader navigation: Use a screen reader to navigate the app's content while offline and verify that it works correctly.

Manual Testing Approach

To manually test offline mode, follow these steps:

  1. Prepare the test environment: Set up a test environment with a Web app and a way to simulate offline mode (e.g., using the browser's developer tools or a network simulator).
  2. Load the app while online: Load the app while connected to the internet and verify that it works as expected.
  3. Switch to offline mode: Switch to offline mode using the chosen method (e.g., disabling the network connection or using the browser's offline mode).
  4. Perform test cases: Perform the test cases outlined above, taking note of any issues or unexpected behavior.
  5. Switch back to online mode: Switch back to online mode and verify that the app recovers without issues.

Automated Testing Approach

Automated testing can be used to supplement manual testing and ensure that offline mode is thoroughly tested. For Web apps, tools like Playwright or Cypress can be used to automate tests. For example, using Playwright, you can write a test like this:


const { test, expect } = require('@playwright/test');

test('offline page loading', async ({ page }) => {
  // Load the page while online
  await page.goto('https://example.com');

  // Switch to offline mode
  await page.setOffline(true);

  // Verify that the page is still accessible
  await page.reload();
  await expect(page).toContainText('Offline mode');
});

This test loads a page while online, switches to offline mode, and verifies that the page is still accessible.

How SUSA Tests Offline Mode Autonomously

SUSA, an autonomous QA platform, can test offline mode autonomously using its curious, impatient, and accessibility personas. These personas can catch issues such as:

By using SUSA's autonomous testing capabilities, developers can ensure that their Web app's offline mode is thoroughly tested and provides a seamless user experience.

Test Your App Autonomously

Upload your APK or URL. SUSA explores like 10 real users — finds bugs, accessibility violations, and security issues. No scripts.

Try SUSA Free