Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to see if gatsby-plugin-offline is working

I am new to Gatsby so please bear with me.

I want to add offline support to my app such that if a user were to try access it while offline (after having visited it online) it would still show up.

Would gatsby-plugin-offline help me achieve this?

If so, how can I try this out? So far I have tried using the plug-in in my app (all default settings), building the app and then serving it locally on my computer at http://localhost:9000/. When I stop the dev server and try access http://localhost:9000/, it does not show up. How can I test to see if this plugin works?

like image 383
Oamar Kanji Avatar asked Jun 14 '19 07:06

Oamar Kanji


1 Answers

After gatsby build the public folder should include sw.js file.

Otherwise, you can find whether the service worker is registered on not at Chrome Dev Console over Application > Service Workers.

like image 64
dmraptis Avatar answered Sep 28 '22 08:09

dmraptis