- From: Taiju Tsuiki <notifications@github.com>
- Date: Mon, 14 Aug 2017 00:29:28 -0700
- To: w3c/ServiceWorker <ServiceWorker@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Monday, 14 August 2017 07:29:50 UTC
For JS files loaded by \<script\>, we can support both module-aware browsers and non-module-aware browsers as below: ```html <script type="module" src="module_script.js"></script> <script nomodule src="classic_script.js"></script> ``` Module-aware browsers load the first one, and non-module aware browsers load the second one by ignoring `type="module"` script and nomodule attribute. Then, how about `Link:` headers and \<link\> tags with `rel="serviceworker"`? IIUC, there is no similar trick to prevent old browsers from loading SW script link with `workertype="module"`, or to disable classic SW on new browsers. To achieve that, IMO, can we change `rel="serviceworker"` to `rel="some-keyword-other-than-serviceworker-to-declare-serviceworker-module"` for `workertype="module"`, and add `nomodule` keyword to \<link\>? -- 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/ServiceWorker/issues/1186
Received on Monday, 14 August 2017 07:29:50 UTC