Skip to content
  • Konrad Mohrfeldt's avatar
    rework PWA integration (again) · 54bf63b5
    Konrad Mohrfeldt authored
    Both our attempts to use a dynamically generated manifest failed. It is
    not clear if these failures are browsers bugs or a misuse of the
    respective feature.
    
    We’ve tried:
    
    1. data-uri manifest
       a very straight-forward approach that injected the
       manifest as base64-encoded URI into the page.
       data-uri evaluation seems to mess with the handling
       of host relative URLs like /.
    2. service-worker MITM
       Once the env was loaded we registered the service
       worker and used it’s request MITM features to
       intercept the request to the /manifest.json URL
       and returned our locally created manifest instead.
       But at least chromium still wouldn’t want to show the
       PWA install button afterwards.
    
    The current approach hard-codes the /~local/manifest.json URL that can
    be overwritten on the service side with a proper web app manifest.
    54bf63b5