O que é o formato de ficheiro WEBMANIFEST?
Um arquivo .webmanifest é o Web Application Manifest, um documento JSON que um navegador lê para instalar e exibir um Progressive Web App (PWA). Ele contém um único objeto JSON cujos membros descrevem o aplicativo: name, short_name, icons, start_url, scope, display, background_color e theme_color, entre outros. Quando você adiciona um PWA à tela inicial de um telefone ou a um desktop, esses valores decidem o ícone do aplicativo, seu título e como a janela é aberta.
O formato é um padrão W3C, rascunhado pela primeira vez em 2013 e suportado em navegadores a partir do Chrome 45 em 2015. Uma página faz o link para ele no cabeçalho HTML:
<link rel="manifest" href="/app.webmanifest">O tipo de mídia registrado é application/manifest+json. A extensão .webmanifest é a que a IANA registrou, embora muitos sites ainda nomeiem o arquivo como manifest.json. Ambos funcionam, desde que o servidor envie um tipo de conteúdo JSON válido.
Segurança e proteção
RISCO: 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.
Detalhes do formato
em resumo- 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.
Programas que abrem arquivos WEBMANIFEST
Detalhes técnicos
especificação profunda| 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. |
| Lançado | 2013 (first W3C Working Draft, December 17, 2013) |
| Versão mais recente | W3C Working Draft (ongoing) |
| Padrão aberto | Sim · livre de royalties |
| Especificação | www.w3.org |
Conversões de WEBMANIFEST
Perguntas e Respostas da Comunidade
perguntado por usuáriosAinda não há perguntas - seja o primeiro a perguntar sobre arquivos WEBMANIFEST.