How to Test Web App Manifest Shortcuts

Test web app manifest shortcuts in browsers and installed apps, including nested routes, query parameters, redirects, and scope-related failures.

Published
Reading time
6 min read
How to Test Web App Manifest Shortcuts
On this page

Manifest shortcuts give users a way to open specific parts of an installed web app. A release check should confirm not only that each shortcut appears, but also that it opens the intended route with the right parameters and redirect behavior.

This tutorial uses a fictional app to show how to inspect shortcut URLs, test them in a browser, and then test them from the installed app.

Key Takeaways

  • A shortcut URL identifies its own destination; it does not replace or append to the manifest’s start_url.
  • Resolve relative shortcut URLs against the manifest URL, then check that they are within the app’s scope.
  • Test the deployed URL in a browser and activate the corresponding shortcut from the installed app. These checks catch different problems.
  • Inspect query strings and every redirect, including the final destination and whether the app remains in its intended context.
  • Shortcut display and installation behavior vary by browser and operating system. Test the combinations your release supports.

Understand the manifest URLs

Suppose a fictional app serves its manifest at https://example.test/app/manifest.webmanifest:

{
  "name": "Project Desk",
  "short_name": "Desk",
  "start_url": "/app/?source=launch",
  "scope": "/app/",
  "shortcuts": [
    {
      "name": "Project 42",
      "url": "projects/42?view=activity"
    },
    {
      "name": "Monthly reports",
      "url": "/app/open-reports?period=month"
    }
  ]
}

This is an illustrative manifest fragment, not a complete installable app. The fictional domain will not resolve unless you configure it in a test environment. Your deployed app must also implement the routes and redirect described below.

The relative projects/42?view=activity URL resolves against the manifest URL to https://example.test/app/projects/42?view=activity. The leading slash in the reports shortcut makes its path relative to the origin, producing https://example.test/app/open-reports?period=month. Neither URL inherits the source=launch parameter from start_url.

start_url is the app’s normal launch destination; a shortcut supplies a different navigation target. The explicit /app/ scope defines the intended area of the app. If scope is omitted, its default is derived from the start URL’s directory. Use an explicit scope when it makes the deployment boundary easier to review, and include a trailing slash when the intended boundary is a directory.

A route can be syntactically within scope and still fail in the deployed app. Conversely, an initial shortcut URL within scope can redirect outside it. The final destination therefore needs its own check.

Advertisement

Prepare a route test matrix

Use your actual deployed origin and manifest location rather than the fictional host. Record the expected behavior with the team before testing:

ShortcutRequested path and queryExpected result
Project 42/app/projects/42?view=activityNested project route opens with the activity view selected.
Monthly reports/app/open-reports?period=monthThe app’s redirect leads to /app/reports?period=month, and the monthly report view opens.

The redirect in this table is an example application requirement, not behavior provided automatically by the manifest. If your app intentionally transforms or removes parameters, record that instead. Include other real shortcuts, authentication requirements, and any expected fallback or error states in your matrix.

Use a URL parser to inspect the resolved scheme, host, path, and query string if that helps diagnose an ambiguous URL. This is only a component check: it does not confirm that the server, client-side router, redirect, or installed app works. Avoid entering sensitive tokens or private URLs into an online tool.

Test each route in a browser

Perform this check against the release candidate’s deployed environment:

  1. Open the deployed manifest directly and confirm that the intended shortcut entries, start_url, and scope are present. If a relative URL is used, resolve it against the actual manifest URL, including its directory.
  2. Paste each resolved shortcut URL into a fresh browser tab. For the nested route, confirm the correct project and view appear after a direct navigation, not only after clicking through from the home page.
  3. For query-dependent routes, check the visible application state against the query string. Try a missing or invalid parameter if your release requirements define how the app should handle one.
  4. For redirects, use the browser’s network tools to inspect the navigation and redirect chain. Confirm the final URL and application state, including whether the query parameter was preserved or deliberately transformed. A redirect can legitimately change the URL, so compare it with the expected behavior rather than assuming every parameter must survive.
  5. Refresh the final route and repeat in a fresh session where appropriate. Check that server routing, any service-worker handling, authentication, and client-side routing do not turn a direct navigation into an unrelated page or an unexpected error.

A successful page load alone is not enough. A single-page app may serve its generic shell for an unrecognized path; verify that the intended screen and data actually load. If authentication is required, test both the expected signed-in flow and the signed-out behavior, including the destination after sign-in.

Advertisement

Test shortcuts from the installed app

Install the release candidate using each browser and operating-system combination you support. Open the installed app’s shortcut menu using the interaction provided by that platform, then activate every shortcut individually.

For each activation, record whether the shortcut is present, its label, the screen that opens, the resulting URL where visible, and the observed query and redirect behavior. Compare these observations with the browser results and your test matrix. In particular, check whether the final destination opens in the expected app or browser context; an out-of-scope redirect may change that context.

If a shortcut is missing, first confirm that the installed app is using the intended deployed manifest. Installation and manifest-update behavior differ across environments, so follow the relevant vendor’s guidance and, where appropriate, reinstall in a clean test profile before concluding that a manifest change failed. Do not assume that editing the manifest immediately updates an existing installation.

If a target environment does not expose shortcut actions, document that result separately from a broken route. A direct browser navigation can verify the destination, but it cannot prove that an installed shortcut is available or launches correctly.

Common Mistakes

  • Resolving relative URLs against start_url. Resolve them against the manifest URL instead; moving the manifest can change their meaning.
  • Testing only from the app’s home page. A nested route may work through client-side navigation but fail on direct entry or refresh.
  • Checking only the initial URL. A redirect can lose a query parameter or lead outside the intended scope.
  • Treating a parser result as a functional test. A valid-looking URL can still produce the wrong screen, an authentication loop, or a server error.
  • Assuming all installations show the same shortcuts. Availability, update behavior, and launch context must be checked on supported platforms.

Best Practices

Keep a release checklist with the resolved URL, expected screen, parameters, redirect chain, and supported environments for every shortcut. Test the deployed manifest and routes together, including a clean installation when update behavior is uncertain. After a route or deployment-path change, repeat both the browser and installed-app checks.

This article’s examples were not executed, and current W3C and browser-vendor documentation was not available for consultation here. Before release, consult the current Web App Manifest specification and the installation and shortcut documentation for each target browser; verify support and behavior on the actual target devices.

Conclusion

To test web app manifest shortcuts, resolve each URL from the manifest, verify its deployed route and redirects in a browser, and then activate it from the installed app. Record platform-specific results so a working route is not mistaken for a verified shortcut experience.

What would your domain sell for?

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