[w3c/manifest] Introduce main.html instead of manifest.webmanifest (#769)

As talks in #97, ... that manifest.webmanifest replicate HTML features, I think spec editors must consider about abandon manifest.webmanifest for these reasons:
- The manifest file has not any idea how to start an app! and we must cache HTML file for each URL that is so bad because all that HTML files is same if have CSR(client-side rendering)! If devs want to have SSR web app (server-side rendering) as an installable app, they must accept that nobody wants to add an app to the home screen that in no internet situation on non-caches URLs shows browser errors or just custom error HTML file!! Manifest is part of PWA and one key purpose is not just app work offline by old caches but works offline natively (CSR client-side rendering). To achieve this, devs must handle lots of logic like routing, ... and best way to implement these needs always start apps with specific `main.html` file in any URL and browser can cache it once for start app in any URL by that file.
- All PWA-starter-kit has just one index.html (I think index name is not a good choice) as the start point of an app that shows PWAs should not have more than one entry point! so we don't need another file than main.html to tell browser for entry point like a manifest file!
- As mention in #97 for security reason (app introduce itself to look like another app) and browser force serve PWA apps over TLS protocol and a certificate for TLS protocol belong to a domain, not URL, a domain can't set more than one app shortcut, so we just need one main HTML file.  So for the future, we must just read the app name and icon from certificate, not from the `manifest` or `main.html` file.

And also I think register another app logic process as `service-worker` also is a huge mistake in web standard due to just register one `main.js` to start an app is enough and devs can write the logic in desired order to handle everything. e.g. [fetch](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API) is [promise](https://developer.mozilla.org/en-US/docs/Web/API/Promise) based so [FetchEvent](https://developer.mozilla.org/en-US/docs/Web/API/FetchEvent) can register globally in window object like other event listener.

I propose this way to tell the browser that our app can be PWA (or just has CSR ability) And you can see below example or our version [main.html](https://github.com/SabzCity/www.sabz.city/blob/master/gui/main.html) that have many other tags that introduce the app, splash screen, ...  
I am not sure now about how to indicate [main.js](https://github.com/SabzCity/www.sabz.city/blob/master/gui/main.js) file in main.html and prevent devs to not include other script tags even inline script in main.html due it must illegal like other languages from having more than one main intro(function)!
```html
    <meta name="display" content="standalone">
    <meta name="theme-color" content="#66ff55">
    <link rel="home" href="/?utm_source=PWA&utm_medium=shortcut">
    <link rel="main" href="/gui/main.html">
    <script type="module" src="/gui/main.js" async></script>
```
By above CSR standard proposal that indicate a `main.html` file to render all URL, we also able to write a compiler to compile web apps to native OS apps easily.
(p.s. We consider to continue this approach, not use any manifest file and make a compiler like Flutter but in HTML standards, not complete new languages.)

Last but not least as lots of good face HTML specification never get standard like [@apply](http://tabatkins.github.io/specs/css-apply-rule/) in CSS, Editors must be brave to abandoned `manifest.webmanifest` file from specification and introduce `main.html` before it's too late and uses some meta and link tags.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/manifest/issues/769

Received on Saturday, 29 June 2019 08:56:01 UTC