Skip to content Skip to sidebar Skip to footer

How To Test Service Workers Offline Mode In Localhost?

How can I test service workers in offline mode locally? I mean, localhost doesn't need internet access so it just keeps fetching all the files. Can I simulate offline in Firefox or

Solution 1:

In Chrome, you can simulate being offline in the DevTools' Application tab, inside the Service Workers panel. You will see there a checkbox that says "Offline".enter image description here

Solution 2:

Also, you could go to the Networks tab and perform the same action. Hope this helps :)

enter image description here

Post a Comment for "How To Test Service Workers Offline Mode In Localhost?"