You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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>?
The text was updated successfully, but these errors were encountered:
For JS files loaded by <script>, we can support both module-aware browsers and non-module-aware browsers as below:
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 withrel="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"
torel="some-keyword-other-than-serviceworker-to-declare-serviceworker-module"
forworkertype="module"
, and addnomodule
keyword to <link>?The text was updated successfully, but these errors were encountered: