# ServiceWorker thinks I'm offline when I'm not

**URL:** https://meta.discourse.org/t/serviceworker-thinks-im-offline-when-im-not/77886
**Category:** Bug
**Created:** [January 12, 2018, 8:57pm UTC](https://meta.discourse.org/t/serviceworker-thinks-im-offline-when-im-not/77886 "2018-01-12T20:57:16Z")
**Posts on this page:** 14
**Page:** 2

<div class="post-metadata">

### Author: ![lw1](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/lw1/32/82012_2.png) [@lw1](https://meta.discourse.org/u/lw1)
#### Post date: [March 1, 2018, 3:38pm UTC](https://meta.discourse.org/t/serviceworker-thinks-im-offline-when-im-not/77886/22 "2018-03-01T15:38:23Z")

</div>

> [@mcnesium](#):
>
> not using Adblock Plus, but Privacy Badger and Decentraleyes

But it wouldn’t surprise me if this wasn’t just Adblock Plus but rather a combination of Discourse and something Blocking extensions do.

---

<div class="post-metadata">

### Author: ![featheredtoast](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/featheredtoast/32/116994_2.png) [@featheredtoast](https://meta.discourse.org/u/featheredtoast)
#### Post date: [March 1, 2018, 5:16pm UTC](https://meta.discourse.org/t/serviceworker-thinks-im-offline-when-im-not/77886/23 "2018-03-01T17:16:48Z")

</div>

Whoa, nice sleuthing! I never suspected adblockers as a culprit to some of the service worker cache issues - I’m curious to learn why adblockers block service workers’ request features, or what about it looks suspicious to them.

---

<div class="post-metadata">

### Author: ![McBlu](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mcblu/32/91128_2.png) [@McBlu](https://meta.discourse.org/u/McBlu)
#### Post date: [March 1, 2018, 6:19pm UTC](https://meta.discourse.org/t/serviceworker-thinks-im-offline-when-im-not/77886/24 "2018-03-01T18:19:51Z")

</div>

We have this issue too and I have google ad blocker.

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [March 1, 2018, 11:58pm UTC](https://meta.discourse.org/t/serviceworker-thinks-im-offline-when-im-not/77886/25 "2018-03-01T23:58:20Z")

</div>

@codinghorror what is your call here, do we junk the offline page for now (from non android) cause Adblock Plus messes it up or do we keep it and keep supporting people complaining about adblock.

(Note this is not about removal of the service worker, just the way it creates the “your browser is offline” page)

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [March 2, 2018, 12:52am UTC](https://meta.discourse.org/t/serviceworker-thinks-im-offline-when-im-not/77886/26 "2018-03-02T00:52:56Z")

</div>

I am not very sympathetic to self inflicted adblock issues

---

<div class="post-metadata">

### Author: ![awlogan](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/awlogan/32/62208_2.png) [@awlogan](https://meta.discourse.org/u/awlogan)
#### Post date: [March 2, 2018, 5:15am UTC](https://meta.discourse.org/t/serviceworker-thinks-im-offline-when-im-not/77886/27 "2018-03-02T05:15:52Z")

</div>

I’ve been running ABP (chrome, FF, MacOS Sierra) and haven’t hit that issue at all. I run ABP in the default mode, nothing tweaked, not sure if that makes a difference. Using multiple communities besides my own (Discourse hosted) and meta.

---

<div class="post-metadata">

### Author: ![fdellwing](https://avatars.discourse-cdn.com/v4/letter/f/9d8465/32.png) [@fdellwing](https://meta.discourse.org/u/fdellwing)
#### Post date: [March 2, 2018, 7:52am UTC](https://meta.discourse.org/t/serviceworker-thinks-im-offline-when-im-not/77886/28 "2018-03-02T07:52:28Z")

</div>

As I’m with you on that, it may look very unprofessional to customers if they cannot visit a forum because “they are offline”, which they aren’t.

For me, this is not a problem at all, since I know how to work around. But since the problem is not only happening with ABP (see #17 and #24), I see the task to change something on discourse’s shoulders.

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [March 2, 2018, 8:16am UTC](https://meta.discourse.org/t/serviceworker-thinks-im-offline-when-im-not/77886/29 "2018-03-02T08:16:41Z")

</div>

Post #17

> [@lw1](#):
>
> Ok, I was able to pin it down to Adblock Plus.

Post #24

> [@McBlu](#):
>
> I have google ad blocker.

Neither of those are Discourse, so I respectfully disagree that it has anything to do with us.

---

<div class="post-metadata">

### Author: ![fdellwing](https://avatars.discourse-cdn.com/v4/letter/f/9d8465/32.png) [@fdellwing](https://meta.discourse.org/u/fdellwing)
#### Post date: [March 2, 2018, 8:34am UTC](https://meta.discourse.org/t/serviceworker-thinks-im-offline-when-im-not/77886/30 "2018-03-02T08:34:06Z")

</div>

> [@codinghorror](#):
>
> Post #17

The issue with matomo forums was opened by me. So I have to disagree that it has nothing to do with Discourse, as the matomo forum is a Discourse instance. And it is the only thing I know of that has this sort of problem.

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [March 2, 2018, 9:55am UTC](https://meta.discourse.org/t/serviceworker-thinks-im-offline-when-im-not/77886/31 "2018-03-02T09:55:07Z")

</div>

You got to report this to Adblock plus, yes we can workaround by stripping a feature but this must be reported to the broken chrome plugin

---

<div class="post-metadata">

### Author: ![featheredtoast](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/featheredtoast/32/116994_2.png) [@featheredtoast](https://meta.discourse.org/u/featheredtoast)
#### Post date: [March 2, 2018, 6:04pm UTC](https://meta.discourse.org/t/serviceworker-thinks-im-offline-when-im-not/77886/32 "2018-03-02T18:04:54Z")

</div>

I just managed to reproduce this issue on try by visiting a topic with a title starting with the word “Advertising”:

[https://try.discourse.org/t/advertising-i-wonder-if-having-the-word-advertising-in-the-title-is-enough-to-set-off-ad-blockers/997/1](https://try.discourse.org/t/advertising-i-wonder-if-having-the-word-advertising-in-the-title-is-enough-to-set-off-ad-blockers/997/1)

It appears to be looking for watchwords. It definitely seems like a rabbit hole to work around this.

---

<div class="post-metadata">

### Author: ![janvlug](https://avatars.discourse-cdn.com/v4/letter/j/51bf81/32.png) [@janvlug](https://meta.discourse.org/u/janvlug)
#### Post date: [March 25, 2018, 2:22pm UTC](https://meta.discourse.org/t/serviceworker-thinks-im-offline-when-im-not/77886/33 "2018-03-25T14:22:52Z")

</div>

I have seen this issue on all (about four) discourse forums that I visit.

I’m using Firefox with these privacy plugins:

- HTTPS Everywhere
- Privacy Badger
- DuckDuckGo Privacy Essentials
- uBlock Origin

Workaround: click the reload button while holding the shift key.

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [May 1, 2018, 1:27am UTC](https://meta.discourse.org/t/serviceworker-thinks-im-offline-when-im-not/77886/34 "2018-05-01T01:27:47Z")

</div>

I believe we have this fixed now cause we check the network status using `navigator.onLine` prior to showing the page.

Can anyone still reproduce this issue?

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [May 2, 2018, 8:00am UTC](https://meta.discourse.org/t/serviceworker-thinks-im-offline-when-im-not/77886/35 "2018-05-02T08:00:07Z")

</div>

This topic was automatically closed after 30 hours. New replies are no longer allowed.

[Previous page](https://meta.discourse.org/t/serviceworker-thinks-im-offline-when-im-not/77886.md?page=1)
