Add a tip for the SKIP_SERVICEWORKERS env variable (#12563)

This commit is contained in:
Jacob Herrington 2021-02-04 06:00:55 -06:00 committed by GitHub
parent f854f65506
commit a92681a4ad
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -44,3 +44,12 @@ selectors more sophisticated than a simple id, class or tag name.
- [Forem PR 6380](https://github.com/forem/forem/issues/6380#issuecomment-592989438)
- [Why is getElementsByTagName() faster than querySelectorAll()?](https://humanwhocodes.com/blog/2010/09/28/why-is-getelementsbytagname-faster-that-queryselectorall/)
- [What is the difference between querySelectorAll and getElementsByTagName?](https://stackoverflow.com/a/30921553/4186181)
## Service workers in development
By default our
[service worker code](https://github.com/forem/forem/blob/master/app/views/service_worker/index.js.erb)
doesn't run in development.
If you're planning to do any work around service workers you'll need to enable
them by setting the `SKIP_SERVICEWORKERS` environment variable to `"false"`.