Trace an old landing page to its service worker

Trace an old landing page to its service worker

An ad points to the current landing page, and the deployment dashboard shows the latest release. A teammate follows the link from a browser they use every day and sees the previous offer. A clean browser shows the correct one. Before changing the ad or purging the CDN, check whether a service worker is supplying an older document to the returning browser.

Give the page a visible release marker

Use a staging copy of the landing page with the same service worker scope and navigation rules as the deployed page. Add a short release label to the staging HTML, such as “checkout copy B.” Pick a label you can read in View Source or in the Network panel. A screenshot of the offer is helpful, but the label lets you tell whether the browser loaded an older document or built an older-looking screen from current HTML.

Prepare two browser profiles. Load the older release in the first profile before deploying the new one, then confirm that the page is controlled by a service worker. Keep the second profile clean until the new release is available. Use the same staging destination and the same synthetic tracking parameters in both. This gives you a returning visit and a fresh visit with a shared starting URL.

Check which component answered the navigation

Open the browser's Network panel before visiting the URL. Read the top-level document response and find the release label. Then inspect the request details for an indication that a service worker supplied the response. Look at the service worker's scope and registration in the Application panel. A registered worker can intercept a navigation within its scope and return a cached response. The relationship between the event and the response is defined in the Service Workers specification.

Suppose the returning profile gets release A and the clean profile gets release B. In the returning profile, use the Application panel's “Bypass for network” setting for one diagnostic visit and look at the document again. If the returning profile now gets B, inspect the worker's navigation rule and Cache Storage for the URL that produced A. Record the request URL and the cache entry separately. Some worker code deliberately ignores the query string, so several campaign URLs can use a single cached document.

If the bypassed profile still gets A, the document response needs a different investigation. Check the redirect chain before comparing response headers. A shortcut or regional route could lead to a different final URL. Compare the final document and cache headers across the two profiles. Keep the browser profile or tab history intact while diagnosing so you can still reproduce the mismatch after changing one variable.

Rehearse what happens while the new worker waits

Keep one staging tab open on the old release while you deploy the update. An installed replacement worker may sit in a waiting state while the previous worker controls open clients. Chrome describes the relevant transitions in its service worker lifecycle guide.

Visit the same destination once while the first tab is still open. Record the document label and which worker is active. Close all tabs for that staging scope, then open the destination again in the same test profile. Record whether the new worker takes control and which document it serves. If the new worker is active and still serves A, examine its cache keys and fetch logic. A new worker version can query an old cache if the navigation rule still permits it.

Avoid treating the diagnostic bypass as a fix. Test the intended worker change on staging with ordinary browser settings. If the team is considering immediate activation, include a test with an old page left open. Old HTML can still request an older script or stylesheet after activation. Verify that both versions can finish the same basic action during the transition.

Verify what a visitor can do on each version

Repeat the navigation from both profiles with the release marker in view. On staging, follow the main call to action through a test completion and confirm that the same synthetic campaign label reaches a test event. Keep the action reversible and use a designated test endpoint or test account. A curiously low conversion count can be real if one profile receives an offer it can no longer complete. The wider measurement checks belong alongside this browser check in a landing-page traffic plan.

In the release note, record the expected document label, the result for each profile, and the observed behavior while the worker was waiting. Attach the exact approved destination URL. That gives the media buyer a reproducible way to check what a returning visitor sees before traffic increases.