Skip to content

Commit

Permalink
Remove information for turning on service worker flags (mdn#1766)
Browse files Browse the repository at this point in the history
ServiceWorkers have been enabled by default in all modern browsers for some time. People who are trying to learn to use ServiceWorkers shouldn't have to read through information about switching on flags. This patch removes that notice.
  • Loading branch information
littledan authored Jan 27, 2021
1 parent a0f32d0 commit 9006db2
Showing 1 changed file with 1 addition and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,7 @@ <h2 id="The_premise_of_service_workers">The premise of service workers</h2>

<h2 id="Setting_up_to_play_with_service_workers">Setting up to play with service workers</h2>

<p>Many service workers features are now enabled by default in newer versions of supporting browsers. If however you find that demo code is not working in your installed versions, you might need to enable a pref:</p>

<ul>
<li><strong>Firefox Nightly</strong>: Go to <code>about:config</code> and set <code>dom.serviceWorkers.enabled</code> to true; restart browser. If you are testing with a non-https local server, you'll need to also set <code>dom.serviceWorkers.testing.enabled</code> to true.</li>
<li><strong>Chrome Canary</strong>: Go to <code>chrome://flags</code> and turn on <code>experimental-web-platform-features</code>; restart browser (note that some features are now enabled by default in Chrome.)</li>
<li><strong>Opera</strong>: Go to <code>opera://flags</code> and enable <code>Support for ServiceWorker</code>; restart browser.</li>
<li><strong>Microsoft Edge</strong>: Go to <code>about:flags</code> and tick <code>Enable service workers</code>; restart browser.</li>
</ul>

<p>You’ll also need to serve your code via HTTPS — Service workers are restricted to running across HTTPS for security reasons. GitHub is therefore a good place to host experiments, as it supports HTTPS. In order to facilitate local development, <code>localhost</code> is considered a secure origin by browsers as well.</p>
<p>These days, service workers are enabled by default in all modern browsers. To run code using service workers, you’ll need to serve your code via HTTPS — Service workers are restricted to running across HTTPS for security reasons. GitHub is therefore a good place to host experiments, as it supports HTTPS. In order to facilitate local development, <code>localhost</code> is considered a secure origin by browsers as well.</p>

<h2 id="Basic_architecture">Basic architecture</h2>

Expand Down

0 comments on commit 9006db2

Please sign in to comment.