Before Your Next App Release, Check Whether PWA start_url Parameters Survive Installation

Check whether PWA start_url query parameters appear after installation, compare browser and app launches, and troubleshoot redirects and resumed windows.

Published
Reading time
7 min read
Before Your Next App Release, Check Whether PWA start_url Parameters Survive Installation
On this page

PWA start_url query parameters can help distinguish a launch from an ordinary page visit, but an installed app may resume an existing window, follow redirects, or navigate before you inspect its URL. Test the launch path on every browser and operating system you support before depending on a parameter.

This guide provides a small staging test for browser and installed-app launches, both with and without a query string. Current browser documentation and the Web App Manifest specification were not available for review here, and the test was not run on any platform. Check your target browsers’ current installation requirements and record your own results before release.

Key Takeaways

  • start_url is the manifest’s requested launch URL; its query string is not a guarantee of permanent attribution.
  • Keep the launch path within the app’s scope. A query parameter does not expand that scope.
  • Compare fresh installations and later launches: reopening an existing app window is not necessarily a fresh navigation to start_url.
  • Use non-sensitive test values. Query strings can appear in logs, history, analytics, and other systems.

What to compare

The manifest is not involved when you directly enter a page URL in a browser tab. That direct visit is your baseline. An installed-app launch exercises a different path: the platform opens or resumes the app according to its own behavior and the app’s manifest.

Run these four cases against the same staging origin:

CaseHow to launchWhat to inspect
Browser, no parameterOpen the test page URL without a query stringThe page’s displayed URL
Browser, parameterOpen the same URL with ?launch=installedWhether the displayed URL contains the parameter
Installed, no parameterInstall with a parameter-free start_url, then launchThe displayed URL after a fresh launch and a later launch
Installed, parameterReinstall with the parameterized start_url, then launchThe displayed URL after a fresh launch and a later launch

Use the same harmless parameter value in both parameterized cases. If a direct browser visit retains it but an installed launch does not, investigate installation, launch, redirects, and client-side navigation separately.

Advertisement

Set up a staging test

The following harness assumes you control a staging site served from a secure origin, and that /pwa-param-test/ resolves to the HTML file below. Use your existing installable staging setup where possible: installation requirements and available installation UI vary by browser. In particular, provide suitable icons and any other resources or configuration required by the browsers you test. This snippet alone does not guarantee that an installation prompt will appear.

Save this as /pwa-param-test/index.html:

<!doctype html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <title>PWA launch URL test</title>
  <link rel="manifest" href="/pwa-param-test/manifest.webmanifest">
</head>
<body>
  <h1>PWA launch URL test</h1>
  <p id="url"></p>
  <p id="mode"></p>
  <script>
    document.getElementById('url').textContent =
      'Current page URL: ' + window.location.href;
    document.getElementById('mode').textContent =
      'Standalone display query matches: ' +
      window.matchMedia('(display-mode: standalone)').matches;
  </script>
</body>
</html>

The displayed URL is the page’s URL when the script runs, not necessarily the first URL requested during launch. The display-mode result is a diagnostic hint, not proof of how the page was launched. Keep this diagnostic page on staging and use only non-sensitive values.

Create /pwa-param-test/manifest.webmanifest with the following content. Supply real PNG icons at the indicated paths; alternatively, adapt the manifest to use icons already provided by your installable staging app.

{
  "name": "PWA launch URL test",
  "short_name": "Launch test",
  "start_url": "/pwa-param-test/",
  "scope": "/pwa-param-test/",
  "display": "standalone",
  "icons": [
    {
      "src": "/pwa-param-test/icon-192.png",
      "sizes": "192x192",
      "type": "image/png"
    },
    {
      "src": "/pwa-param-test/icon-512.png",
      "sizes": "512x512",
      "type": "image/png"
    }
  ]
}

For the parameterized installation, change only the start_url value:

"start_url": "/pwa-param-test/?launch=installed"

This second block is a manifest field to substitute into the full manifest, not a complete manifest by itself. Keep the path and scope unchanged so the query string is the variable under investigation. Verify that both URLs return the test page without an unexpected redirect.

Run the browser and installation checks

  1. In a browser tab, open /pwa-param-test/ on your staging origin. Note the URL displayed by the page.
  2. Open /pwa-param-test/?launch=installed in a browser tab. Note whether the page displays the query string.
  3. Set the manifest’s start_url to /pwa-param-test/. Confirm that the browser receives the updated manifest, then install the app using the target platform’s installation flow.
  4. Close the app completely where the platform allows it, launch it from its installed entry point, and record the displayed URL. Launch it again and record whether it opened a new page or resumed an existing window.
  5. Uninstall the test app, update the manifest to use /pwa-param-test/?launch=installed, and ensure the updated manifest is served. Use a fresh browser profile or clear relevant site data if needed; beware that this can remove other staging data.
  6. Install again and repeat the fresh and subsequent launch checks. Repeat the sequence on each supported browser and operating system.

Record the browser and OS versions, manifest value, installation method, launch method, displayed URL, and whether an existing window was resumed. Also record when installation was unavailable; do not treat a missing install option as a parameter failure. If a platform retains an old manifest or app identity after reinstalling, isolate the test using a fresh profile or another staging environment rather than assuming the new value took effect.

If the displayed URL differs from the manifest, inspect the launch request and redirect chain using the debugging tools available on that platform. A server redirect, service worker, or client-side router may change the URL before the test page displays it. Likewise, if a later launch resumes an existing window, its current URL may reflect previous navigation rather than a new start_url request.

Advertisement

Scope, launch URLs, and attribution

start_url identifies where the app requests to start; scope describes the URL space associated with the app. In this test, both launch variants use the /pwa-param-test/ path under the declared scope. Adding ?launch=installed changes the launch URL’s query string, not the app’s scope. Conversely, a query string cannot make an otherwise out-of-scope path part of the app.

A launch parameter can be useful as a limited diagnostic signal, but do not treat its presence as proof of a particular campaign or its absence as proof that the app was not installed. Values may be removed by redirects or application code, and subsequent launches may resume a page without requesting the start URL again. If attribution matters, define its limits and use a privacy-reviewed measurement approach rather than relying on this parameter as a permanent identifier.

Common Mistakes

  • Testing only a browser tab. Direct navigation does not establish what the installed entry point will do.
  • Changing the manifest without reinstalling or checking the served version. The installed app or browser may still use previously obtained metadata.
  • Treating every later launch as a cold launch. Record whether an existing app window was resumed.
  • Checking only the final URL. Redirects and app code can alter it after the initial request.
  • Assuming a query value is durable attribution. It is a URL value, not a reliable record of the user’s installation or campaign history.

Best Practices

  • Test on the actual browser and OS combinations you support, using isolated staging data and fresh installations where practical.
  • Use a generic value such as launch=installed for diagnostics. Avoid personal identifiers, credentials, tokens, or sensitive campaign information in launch URLs.
  • Review how URLs flow through server logs, analytics, redirects, browser history, and third-party requests. Minimize collection and retention, and apply your privacy and consent requirements.
  • Re-run the matrix after changes to the manifest, redirects, service worker, or routing behavior. Verify installation eligibility and platform-specific behavior against current documentation for your targets.

Conclusion

Compare direct visits with fresh and subsequent installed launches, using both versions of start_url. The result is a platform-specific observation for your app and deployment—not a guarantee that a query parameter will survive every launch or provide lasting attribution.

What would your domain sell for?

A free TidyURLs account unlocks the Domain Estimator. It prices a name from 191,011 real domain sales.