# Disable service worker initializer

**URL:** <https://meta.discourse.org/t/disable-service-worker-initializer/116392>\
**Category:** Development\
**Created:** [April 30, 2019, 3:59am UTC](https://meta.discourse.org/t/disable-service-worker-initializer/116392 "2019-04-30T03:59:31Z")\
**Posts on this page:** 1\
**Showing post:** 11

<div class="post-metadata">

**Author:** ![Jacky\_Cheng](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jacky_cheng/32/139694_2.png) [@Jacky\_Cheng](https://meta.discourse.org/u/Jacky_Cheng)\
**Post date:** [May 7, 2019, 6:02am UTC](https://meta.discourse.org/t/disable-service-worker-initializer/116392/11 "2019-05-07T06:02:46Z")

</div>

Thanks for your reply.  
I forgot to bring up that Safari now can support service-worker.  
So  
`const isApple = !!navigator.platform.match(/(Mac|iPhone|iPod|iPad)/i);`  
should be remove Mac condition in my opinion.  
Also in [discourse/app/assets/javascripts/discourse/initializers/register-service-worker.js.es6 at abbc639e0d362ae90b52c8b5c6922d9e610777f8 · discourse/discourse · GitHub](https://github.com/discourse/discourse/tree/abbc639e0d362ae90b52c8b5c6922d9e610777f8/app/assets/javascripts/discourse/initializers/register-service-worker.js.es6) the else condition would also unregister service worker, it should add the url condition.

---

_[View the full topic](https://meta.discourse.org/t/disable-service-worker-initializer/116392)._
