demo · v135

Client.url ignores pushState

Chrome 135 makes Client.url reflect the creation URL of the document — pushState navigations no longer mutate it. The demo runs a real pushState and compares location.href (live) with what a registered service worker reports as the client URL.

Service Worker: ?

location.href (live, mutates)

SW Client.url (creation URL, Chrome 135+)

the code

// In the SW:
self.addEventListener("message", async (e) => {
  const all = await self.clients.matchAll();
  e.ports[0].postMessage(all.map((c) => c.url));
});

// Page does history.pushState — before Chrome 135 this mutated c.url.
// Now it stays as the creation URL.

see also