Manifest.json
HTMLManifest.json, commonly called the Web App Manifest, is a JSON file linked from a site’s HTML that describes how the site should behave when installed or presented like an app. It defines metadata such as the app name, icon set, theme colours, start URL, and display mode, which browsers use for install prompts and homescreen integration. While it does not directly influence search rankings, a well-formed manifest supports brand consistency, improves installability, and can reduce friction around icon assets and splash screens—factors that indirectly affect user experience and performance perception.
Definition and scope
Manifest.json is a machine-readable description of a web application, linked with a rel="manifest" tag in the document head. It centralises metadata—names, icons, colours, and behavioural preferences—so browsers can render install prompts, identify suitable icons, and apply a standalone or minimal-UI display mode when the site runs as an installed app. The file sits alongside other head resources (icons, theme colour, social meta) but serves a distinct role: bridging webpage identity with platform-level UI and install experiences.
Its scope covers app-level identity and presentation rather than page content or navigation structure. This makes the manifest particularly relevant to PWAs and to icon and splash-screen management on Android and some desktop environments. On iOS and iPadOS, the manifest is partially supported for metadata but Apple’s home-screen icons typically still rely on apple-touch-icon links, so teams often maintain both the manifest and platform-specific icon declarations.
Overview
A typical manifest includes fields such as name and short_name (for labels), start_url (entry point), display (how the app should render when launched), background_color and theme_color (used for splash screens and browser UI), and icons (an array of image candidates). Browsers consume these fields to choose the best-fitting icon at install time, style system chrome, and determine what happens when the user launches the app from a homescreen or app launcher.
Relevance to image optimisation and performance
Despite being a small file, the manifest is a hub for image assets. The icons array lists multiple icon sources (different sizes and purposes), which are fetched at install time or when generating system UI. Supplying properly sized, maskable, and efficiently compressed icons avoids upscaling, prevents blurry results on high-DPI screens, and reduces bytes downloaded by the user. Because the manifest fetch is non-render-blocking, it rarely affects metrics like LCP; however, oversized or redundant icon files referenced by the manifest can waste bandwidth later, particularly on constrained devices or repeat installs.
Definition and role
The manifest’s primary role is to describe install-time and launcher-time behaviour. Fields like display (standalone, minimal-ui, fullscreen) and orientation influence the shell around your app when launched outside the browser tab context. Fields like scope and id help the browser determine whether a given URL belongs to the same installed experience, shaping back-button behaviour and URL handling. None of these fields change how search engines crawl or index content, but they affect how users experience and perceive the site as an application.
Icons and brand presentation
The icons field points to a set of image candidates that the browser can choose from based on size, density, and purpose. Including maskable icons ensures that important foreground artwork remains visible when the OS applies adaptive shapes. Using multiple sizes aligned to common launchers (for example 192×192 and 512×512 PNGs for Android) avoids runtime scaling and reduces artifacts. For teams focused on performance, optimising these icon assets (lossless compression, eliminating metadata, suitable colour depth) keeps install flows snappy while preserving visual quality.
Fetch characteristics
When a page includes a link rel="manifest", the browser typically fetches the manifest asynchronously soon after parsing the head. This request does not block rendering or critical rendering path metrics and is generally assigned a low priority. The resource has a distinct request destination (manifest), can be intercepted by a service worker, and is eligible for standard HTTP caching. Serving it with the application/manifest+json content type is recommended to aid correct handling and tooling diagnostics, though most engines will still attempt to parse JSON if the type is generic.
Caching is important because the manifest may be refetched on subsequent visits, during install flows, or when the browser checks for updates. Long-lived caching with validators (ETag or last-modified) balances freshness and network cost; when changes are infrequent, cache lifetimes of days or weeks are common. The manifest fetch is not typically preloaded, and preconnects offer limited benefit unless the file is hosted on a separate origin. If a service worker controls the page, it can serve the manifest from cache, but care is needed to avoid serving stale metadata after brand updates or icon changes.
Cross-origin and security considerations
Linking a manifest from another origin can introduce complications around caching and platform features. Same-origin hosting is a pragmatic default that simplifies scoping and update behaviour. If referencing a CDN, ensure predictable caching and integrity of referenced icons. While the manifest is not executable, it influences UI surfaces, so provenance and version control matter; serving over HTTPS is standard, and many installability checks require secure contexts.
What “valid” means
Validity has two layers: syntactic and semantic. Syntactic validity requires well-formed JSON with a correct content type and encodings. Semantic validity means the manifest includes appropriate fields with values that meet browser expectations. Commonly checked fields include name or short_name, start_url, display, icons, theme_color, and background_color. Some properties are optional, but missing or inconsistent values can degrade the install experience, cause unexpected URL handling, or lead to poor icon selection on specific platforms.
For icons entries, src should point to reachable image files, sizes should reflect the actual pixel dimensions (e.g., "192x192"), type should match the file’s MIME type, and purpose can include "maskable" or "monochrome". Browsers do not always verify that declared sizes match the binary, but mismatches risk blurry or cropped results. Installability audits may also require that scope logically contains start_url and that the manifest URL is reachable over HTTPS. Developer tools typically surface warnings for missing fields, opaque responses, or non-ideal caching headers.
Implementation notes
Place the rel="manifest" link early in the head to allow opportunistic fetching without affecting critical rendering. Serve the manifest and its icon assets over HTTPS with stable URLs and explicit content types (application/manifest+json for the manifest, image/png or image/svg+xml as applicable for icons). Establish a caching strategy: immutable URLs for versioned icons with far-future max-age, and shorter lifetimes with validators for the manifest itself so updates propagate reliably. Keep the manifest small to minimise transfer overhead on repeated fetches.
For icons, supply a concise set that covers common launchers without redundancy. On Android, 192×192 and 512×512 PNGs with purpose: "any" and a maskable variant often suffice; consider a monochrome variant for system-generated badges. Optimise icon binaries with lossless compression and remove EXIF or ancillary chunks where safe. On Apple platforms, maintain apple-touch-icon links alongside the manifest to ensure consistent homescreen results, as iOS still prefers platform-specific declarations for icons and splash screens.
Comparisons
Manifest.json vs. apple-touch-icon and favicon
Manifest icons are primarily used for install experiences and app launchers, while favicons target browser tabs and bookmarks, and apple-touch-icon targets iOS homescreen shortcuts. Many sites include all three for broad coverage. From a performance perspective, maintaining a minimal, non-duplicative set of icon files and reusing sources across declarations reduces total bytes and cache fragmentation.
Manifest.json vs. Service Worker
The manifest defines identity and presentation; the service worker defines offline behaviour, caching, and event handling. Installability checks often consider both: a valid manifest and a service worker that serves the start_url. Together they form the core of a PWA, but they solve different problems and have different performance impacts. The manifest is metadata; the service worker controls network flows and can materially change load performance and resilience.
Manifest.json vs. meta theme-color and platform meta tags
Theme colours can be declared both in the manifest and via meta tags. Browsers tend to prefer meta tags for immediate page rendering, while the manifest values are used for installed contexts and splash screens. For consistency, align values across both, and rely on platform-specific meta where the manifest is not fully supported.
FAQs
Does Manifest.json affect SEO rankings?
There is no direct ranking boost from having a manifest. Its value is experiential: better install flows, consistent icons, and coherent branding in system UI. These can improve engagement metrics, which correlate with business outcomes but are not themselves ranking signals.
What image formats should icons use in the manifest?
PNG remains the most broadly supported for install icons, especially on Android. Some environments recognise SVG or WebP, but behaviour varies, and maskable icons typically rely on PNG. When in doubt, ship PNGs for required sizes, and test across target devices and OS versions.
How often should the manifest be updated or refetched?
Functional changes are infrequent; updates tend to follow rebrands, icon refreshes, or URL structure changes. Browsers may refetch periodically or during install. Use cache validators so updates propagate without forcing short cache lifetimes, and version icon filenames to bust caches when assets change.
Can the manifest live on a CDN or another origin?
It can, but same-origin hosting is simpler for scoping and update guarantees. If using a CDN, ensure HTTPS, stable URLs, predictable caching, and correct content types. Keep referenced icons reachable with similarly robust caching strategies to avoid broken install flows.
What sizes belong in the icons array?
Common practice includes at least 192×192 and 512×512 for Android launchers, plus a maskable variant of a large size. Additional sizes can be added for specific platforms, but avoid excessive duplication. Ensure the sizes field matches actual pixel dimensions to help the browser choose efficiently and avoid scaling artifacts.
Synonyms
Learn More
Explore OPT-IMG's image optimization tools to enhance your workflow and get better results.