- From: aliams <notifications@github.com>
- Date: Fri, 16 Mar 2018 13:27:53 -0700
- To: w3c/ServiceWorker <ServiceWorker@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
- Message-ID: <w3c/ServiceWorker/issues/1288@github.com>
The service worker spec currently specifies that we should override the behavior for [importScripts()](https://w3c.github.io/ServiceWorker/#importscripts): _Extract a MIME type from the response’s header list. If this MIME type (ignoring parameters) is not a JavaScript MIME type, return a network error._ Note that in the HTML spec, [importScript](https://html.spec.whatwg.org/multipage/workers.html#dom-workerglobalscope-importscripts ) does the following: 1. _Fetch a classic worker-imported script given url and settings object, passing along any custom perform the fetch steps provided. If this succeeds, let script be the result. Otherwise, rethrow the exception._ 2. _Run the classic script script, with the rethrow errors argument set to true._ In a [different section](https://html.spec.whatwg.org/multipage/webappapis.html#fetch-a-single-module-script) of the spec where it does say to check it, it calls out the scenario where it doesn’t: _For historical reasons, fetching a classic script does not include MIME type checking. In contrast, module scripts will fail to load if they are not of a correct MIME type._ Considering that all browser are not implementing the service worker spec text override, should we remove it from the spec? -- 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/1288
Received on Friday, 16 March 2018 20:28:17 UTC