MENU

Fun & Interesting

Service Workers - When Fetch Goes Wrong

Video Not Working? Fix It Now

This is the seventh video in the Understanding Service Workers course. This video explains how you can use your Service Worker to handle an offline-first app as well has gracefully handling 404 errors. Also discussed are CORS errors with fetch calls from your Service Worker. Code from Video: https://gist.github.com/prof3ssorSt3v3/7e5b8200dbe226049b49b6991396c7b3 MDN Request mode reference: https://developer.mozilla.org/en-US/docs/Web/API/Request/mode MDN respondWith reference: https://developer.mozilla.org/en-US/docs/Web/API/FetchEvent/respondWith Full Service Worker video playlist: https://www.youtube.com/watch?v=NJRu3pmmN-4&list=PLyuRouwmQCjl4iJgjH3i61tkqauM-NTGj

Comment