[w3c/ServiceWorker] mimetype requirement of service worker importScripts() (#1032)

Currently we require a well-formed mime-type for service worker scripts.  See step 7.7:

https://w3c.github.io/ServiceWorker/#update-algorithm

But `importScripts()` does not have this check:

https://w3c.github.io/ServiceWorker/#importscripts

Should we require a well-formed mime-type on imports?

Note, this is currently a compat problem.  On this site:

https://pwa-directory.appspot.com/

The SW script tries to import:

https://pwa-directory.appspot.com/sw-offline-google-analytics/offline-google-analytics-import.js

Which is served with the headers:

  Content-Type:"text/html"
  X-Content-Type-Options:"nosniff"

-- 
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/1032

Received on Friday, 16 December 2016 19:25:05 UTC