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?
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
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With