Service Worker Offline mode

I created a service worker and it caches all the files and it works offline. What I want is to have on Android the Offline label like in image.

The github demo for that page is here. I read the code but didn’t found anything that would set that Offline in the left of Url bar.

I cheked multiple websites that have service workers but this is the online one that that I found that has that label.

https://github.com/gauntface/simple-push-demo


Source: stackoverflow-javascript