huxpro.github.io/blob/master/sw.js)
huangxuan.me
Visit /sw-with-gh-301 Without SW:
/sw-with-gh-301 to /sw-with-gh-301/
Visit /sw-with-gh-301 With SW:
https://huangxuan.me/sw-with-gh-301https://huangxuan.me/sw-with-gh-301?${randomQuery} (for caching-bust & revalidate)https://huangxuan.me/sw-with-gh-301/${randomQuery}, it response with 404 instead
Request.type & Request.destination hasnt implementated yet, Request.mode and its polyfillas googlechrome.github.io/samples/service-worker/custom-offline-page/ showed can be a workaround cache: no-store so web developers can bypass HTTP Caching provided by gh-pages or any CDN when needed and without any hacks. Should I concluded that Github-Pages' environment is super unfriendly with SW...sigh