v147 · Security · Local Network Access

LNA restrictions on service worker WindowClient.navigate()

Chrome 147 applies Local Network Access (LNA) restrictions to WindowClient.navigate() calls from service workers. A service worker registered by a public page can no longer programmatically navigate that page's window to a local network URL.

concepts

  1. Navigate Demo

    Shows how WindowClient.navigate() behaves in Chrome 147 when a service worker attempts to navigate a client window to a private network URL — the call is blocked and the promise rejects.

  2. LNA Context

    Explains the full set of Chrome 147 Local Network Access restrictions across fetch, WebSocket, WebTransport, and service worker navigate — and the consistent opt-in mechanism.

  3. SW Navigate LNA Scope Map

    Full permission matrix showing which SW registration tiers can navigate clients to which network tiers. Enter any URL pair to get an instant allowed/blocked verdict and the exact header fix for blocked cases.

  4. SW Navigate Audit

    Register a service worker and audit any target URL against Chrome 147's LNA rules. Shows the specific rule that blocks navigate() to local addresses, the permission prompt UX, and the recommended postMessage alternative — plus a real SW navigate() simulation.

  5. Compatibility Lab

    Probes service worker availability, classifies page origin context, and shows which WindowClient.navigate() target URLs are blocked in Chrome 147. Provides the postMessage-based alternative for service workers that need to signal navigation to private network resources.

why it shipped

WindowClient.navigate() allows a service worker to redirect the browser window it controls to a new URL. Without LNA restrictions, a compromised or malicious service worker installed by a public page could use this to redirect the user's tab to a local network address — an internal admin panel, a router configuration page, or any device on the local network. Chrome 147 closes this attack path: service workers from public origins cannot navigate windows to local network URLs.

the change

// service-worker.js registered at https://public.example.com/sw.js

self.addEventListener('message', async event => {
  const clients = await self.clients.matchAll({ type: 'window' });

  for (const client of clients) {
    // Chrome 147+: this fails if 'client' is a public-origin window
    // and the navigate target is a local network URL
    try {
      await client.navigate('http://192.168.1.1/admin'); // blocked
    } catch (err) {
      // DOMException: Failed to navigate the WindowClient
    }

    // These remain allowed:
    await client.navigate('https://public.example.com/other'); // same origin — ok
    await client.navigate('https://api.public.example.com/');  // public — ok
  }
});

references

implementation reference

Need the exact API surface, compatibility boundaries, errors, lifecycle, and source links? Read the matching gendn reference ↗