[Resolved] Works from Github but not Glitch... serviceworker, offline


#1

Console: {“lineNumber”:0,“message”:“The FetchEvent for “https://p25.glitch.me/aux/ibm.ttf” resulted in a network error response: the promise was rejected.”,“message_level”:2,“sourceIdentifier”:1,“sourceURL”:""}
Console: {“lineNumber”:0,“message”:“Uncaught (in promise) TypeError: Failed to fetch”,“message_level”:3,“sourceIdentifier”:1,“sourceURL”:“https://p25.glitch.me/sw.js”}

Everything works fine until I turn off internet and reload, and everything is fine even then except for a single file: “aux/ibm.ttf”

    return cache.addAll([ '/',          
      'index.html', 'client.js',
      'aux/aux.js', 'style.css',
      'manifest.json', 'aux/icon-144.png',
      'aux/ibm.ttf', 'aux/quack.wav' ])

Of all the files being cached, what could possibly be wrong with this font file that it works online but not of the cache?

And stranger still this error only happens with the app hosted on Glitch. The same app exported to Github works as expected.


#2

Adding {ignoreVary:true} to caches.match() solved the problem… something about different headers.