Concept in Installation
App shortcuts after install
Published Updated
App shortcuts let users open key tasks or pages from an installed web app’s icon. Each entry in
the manifest’s shortcuts member supplies a name and destination URL. It can also supply
presentation data. Browsers can present those entries in a context menu when the user right-clicks or
long-presses the icon.
The compatibility dataset records support from Chrome 84 on Android and lists Samsung Internet as a mirror.
On desktop, it records support from Chrome and Edge 96. It also records Safari 17.4 on macOS.
It records no support in Safari on iOS or Firefox (BCD manifests.webapp.shortcuts).
How it works
Section titled “How it works”The menu is attached to an installed app. Chrome’s documentation describes right-clicking the app icon in the Windows taskbar or macOS Dock. On Android, the documented action is touching and holding the launcher icon. Microsoft Edge exposes manifest shortcuts as Windows Jumplist items. Safari 17.4 on macOS Sonoma places custom shortcut commands in the File menu and the Dock context menu.
The browser decides how many declared entries to show and how to present them. web.dev documents limits of 10 shortcuts for Chrome and Edge on Windows and 3 for Chrome on Android, while MDN states that browsers or operating systems may truncate the array. Put the most important actions first. After installation, a changed list reaches the platform only after the manifest update algorithm runs; changing the JSON does not promise an immediate menu refresh.
Each shortcut object carries name and url. Optional fields include short_name and
description; an entry can also supply icons. The specification resolves url against the manifest URL. A manifest at
/dashboard/manifest.json with "url": "../projects" therefore targets /projects. The
resolved URL must remain within the manifest scope; the processing algorithm ignores an entry
whose URL is not within scope. Shortcut icons use the same image-resource members as the
manifest’s main icons array.
Activating an entry navigates to its url. Keep those destinations reachable from the app’s own
interface as the working route when a browser does not expose the menu. A query parameter on the
shortcut URL can label that launch for application routing or analytics; web.dev recommends
annotating shortcut URLs in the same way as start_url.
Examples
Section titled “Examples”Declare two shortcuts in the manifest, track which one launches the app, and keep their URLs available inside the app for browsers without shortcut support.
Preventing an out-of-scope shortcut failure
Section titled “Preventing an out-of-scope shortcut failure”The manifest lives at /app/manifest.webmanifest, so the relative URLs resolve under /app/. Each entry carries a ?source=shortcut query so the app can attribute the launch.
{ "name": "Calendar", "start_url": "/app/", "scope": "/app/", "display": "standalone", "shortcuts": [ { "name": "New event", "short_name": "New", "description": "Create an event starting now", "url": "new-event?source=shortcut", "icons": [{ "src": "icons/new-event-96.png", "sizes": "96x96", "type": "image/png" }] }, { "name": "Today", "url": "today?source=shortcut", "icons": [{ "src": "icons/today-96.png", "sizes": "96x96", "type": "image/png" }] } ]}Writing "url": "/new-event" instead resolves outside /app/. The specification’s processing
algorithm then ignores the shortcut because the target is outside the manifest scope. Keep the
relative destination under /app/, or widen scope deliberately if the app owns the target.
Telling which shortcut launched the app, with a fallback for browsers without shortcuts
Section titled “Telling which shortcut launched the app, with a fallback for browsers without shortcuts”The app reads location.pathname and the source query on startup. It always exposes the same
destinations in its own menu, so the task remains reachable when the installed-app menu is absent
or truncated.
const url = new URL(location.href);const fromShortcut = url.searchParams.get('source') === 'shortcut';
if (fromShortcut && url.pathname.endsWith('/new-event')) { openEventEditor({ startsAt: Date.now() }); analytics.track('launch_shortcut', { shortcut: 'new-event' });} else { renderQuickActions([ { label: 'New event', href: '/app/new-event?source=menu' }, { label: 'Today', href: '/app/today?source=menu' }, ]);}
const installed = matchMedia('(display-mode: standalone)').matches;document.body.dataset.launchMode = installed ? 'standalone' : 'browser';The application controls the source value in both routes. The shortcut branch records the
manifest entry; the fallback branch renders ordinary links without claiming that JavaScript can
detect whether the operating system displayed a shortcut menu.
Diagnosing a menu that does not appear
Section titled “Diagnosing a menu that does not appear”Start with the shortcuts compatibility dataset. A manifest edit cannot add the menu on a browser and operating system combination that the dataset records as unsupported. On Microsoft Edge, open DevTools, select Application, select Manifest, and scroll to the shortcuts list. Microsoft documents that panel as the place to test whether shortcuts are configured correctly. If the expected entry is absent there, inspect the manifest response the page actually links instead of assuming that the edited local file was served.
const link = document.querySelector('link[rel="manifest"]');if (!link) throw new Error('No manifest link');
const response = await fetch(link.href);if (!response.ok) throw new Error(`Manifest HTTP ${response.status}`);
const manifest = await response.json();const documentURL = new URL(location.href);const parseURL = (value, base) => { if (typeof value !== 'string' || value === '') return null; try { return new URL(value, base); } catch { return null; }};const isWithinScope = (target, scope) => target.origin === scope.origin && target.pathname.startsWith(scope.pathname);
const startCandidate = parseURL(manifest.start_url, link.href);const startURL = startCandidate?.origin === documentURL.origin ? startCandidate : documentURL;const defaultScope = new URL('.', startURL);const scopeCandidate = parseURL(manifest.scope, link.href);if (scopeCandidate) { scopeCandidate.search = ''; scopeCandidate.hash = '';}const scope = scopeCandidate && isWithinScope(startURL, scopeCandidate) ? scopeCandidate : defaultScope;
console.info('Processed start URL and scope', { startURL: startURL.href, scope: scope.href });const shortcuts = Array.isArray(manifest.shortcuts) ? manifest.shortcuts : [];const rows = shortcuts.map((item) => { const target = parseURL(item?.url, link.href); return { name: item?.name, target: target?.href ?? 'invalid URL', validName: typeof item?.name === 'string' && item.name.trim() !== '', withinScope: target ? isWithinScope(target, scope) : false, };});console.table(rows);The logged URLs follow manifest processing. An absent or unusable start_url falls back to the document URL. An absent or unusable scope falls back to the processed start URL’s parent path; the same fallback applies when that scope does not contain the start URL. Use the table to find a missing or empty name, an invalid URL, a URL resolved against the wrong manifest directory, or a target outside that processed scope. The specification’s shortcut-processing algorithm returns failure for an out-of-scope URL and for a missing or empty name. Correct the served manifest, then revisit the Application panel after the browser processes the manifest update. Keep the ordinary in-app links from the previous example available during that update path; they provide the same destinations without depending on an operating-system menu.
See also
Section titled “See also”- Web Application Manifest: shortcuts member (w3.org)
- Expose common app actions as shortcuts (developer.mozilla.org)
- Get things done quickly with app shortcuts (web.dev)
shortcutsmanifest membershortcutsbrowser support- beforeinstallprompt event
scopemanifest member
Specifications
| Specification | Status |
|---|---|
| manifest: shortcuts | W3C |
- Legend
- Yes
- Partial
- Flag
- No
- Unknown
| Browser / Platform | Support | Versions | Confidence | Source | Notes |
|---|---|---|---|---|---|
| Chrome (Android)# | Yes | 85 | low | source | — |
| Chrome (Desktop)# | Yes | 96 | low | source | — |
| Edge (Desktop)# | Yes | 96 | low | source | — |
| Samsung Internet# | Yes | 14.0 | low | source | — |
| Firefox (Desktop)# | No | — | low | source | 1 |
| Safari (iOS)# | No | — | low | source | 2 |
| Safari (macOS)# | Yes | 17.4 | low | source | — |
- Firefox desktop does not support `shortcuts`. Its taskbar web apps (Windows, Firefox 143 and later) are pinned from the address bar rather than installed from the manifest.
- Not supported on iOS.