Che cos'è il formato di file WEBMANIFEST?
Un file .webmanifest è il Web Application Manifest, un documento JSON che un browser legge per installare e visualizzare una Progressive Web App (PWA). Contiene un singolo oggetto JSON i cui membri descrivono l'app: name, short_name, icons, start_url, scope, display, background_color e theme_color, tra gli altri. Quando aggiungi una PWA alla schermata iniziale di un telefono o a un desktop, questi valori decidono l'icona dell'app, il suo titolo e come si apre la finestra.
Il formato è uno standard W3C, redatto per la prima volta nel 2013 e supportato nei browser a partire da Chrome 45 nel 2015. Una pagina si collega ad esso nell'intestazione HTML:
<link rel="manifest" href="/app.webmanifest">Il tipo di media registrato è application/manifest+json. L'estensione .webmanifest è quella registrata da IANA, sebbene molti siti nominino ancora il file manifest.json. Entrambi funzionano purché il server invii un tipo di contenuto JSON valido.
Sicurezza e incolumità
RISCHIO: LOWA .webmanifest file is plain-text JSON with no executable code, so opening it cannot run anything on your machine. The only practical risk is that a manifest can declare protocol_handlers or file_handlers that register a PWA to handle links or file types once the app is installed, which is a browser-mediated permission, not an action of opening the file. Editing an invalid manifest can break PWA installation but poses no security threat.
Dettagli del formato
in sintesi- Firefox WebExtension manifest - Browser extensions use a manifest file, but it is named manifest.json with a .json extension, not .webmanifest.
- Java JAR/app manifests - Unrelated MANIFEST.MF metadata inside Java archives; different format and purpose.
Programmi che aprono file WEBMANIFEST
Dettagli tecnici
specifiche approfondite| Encoding | UTF-8 text |
| Byte order | Not applicable (text) |
| Container | JSON object with top-level keys called members |
| Compression | None (may be gzip/brotli compressed in transit by the web server) |
| Typical size | Under 5 KB |
| Structure | A single JSON object whose members describe a web application: name, short_name, description, icons (array of image objects with src, sizes, type), start_url, scope, display, orientation, background_color, theme_color, categories, screenshots, shortcuts, share_target, protocol_handlers, and file_handlers. |
| Integrity | None built in; integrity relies on HTTPS transport and same-origin/CORS fetch rules |
| Platforms | Windows, macOS, Linux, Android, iOS, ChromeOS |
| Notes | Referenced from a page's HTML head via <link rel="manifest" href="app.webmanifest">. The browser reads it to install a Progressive Web App, set the home-screen icon and name, and control the launch display mode. Servers should return it with the application/manifest+json media type, though browsers also accept application/json. When the manifest is on a different origin than the page scope it must be fetched with CORS. |
| Rilasciato | 2013 (first W3C Working Draft, December 17, 2013) |
| Ultima versione | W3C Working Draft (ongoing) |
| Standard aperto | Sì · royalty-free |
| Specifica | www.w3.org |
Conversioni WEBMANIFEST
Domande e risposte della community
chiesto dagli utentiAncora nessuna domanda - sii il primo a chiedere informazioni sui file WEBMANIFEST.