Search code examples
internet-explorerhtml5-appcachemicrosoft-edge

Edge throws "AppCache Fatal Error" When using AppCache


Problen

I’m using AppCache to store some JS, images, and small (several kb) video files for a web app. With Firefox, Chrome and Canary, it works fine. I have a debugging class that logs what’s happening each time and I can see that they are getting cached in the Resources folder.

Potential Solution

On IE and Edge however, it throws that error, “AppCache Fatal Error”. I thought it had something to do with IIS and the MIME types, as I’m deploying from Visual Studio 2015 CE, but that doesn’t seem to be it.

It is difficult to debug, because the event doesn’t offer any information other than Type: Error.

Everything I’ve discovered on StackOverflow points towards making an addition to the Web.config file:

<system.webServer>
    <staticContent>
        <mimeMap fileExtension=".appcache" mimeType="text/cache-manifest" />
    </staticContent>
</system.webServer>

I’ve tried this, and am still having the same issue, but again, only in Edge and IE. Is there something blatantly obvious that I’m missing here, or know why it would not work in Edge or IE?

And this explains more about the project.

Additionally, the files I have stored locally on the web server (JS, CSS, and index.html) all seem to cache fine. I think it could be the files from my blob storage (the MP4s) which may throw the issue?

As soon as the app starts, two rooms will show you video:

Hall 1 (Top left button) Bedroom (bottom row, 2nd button).

I'm attempting to cache those videos. Everything else seems to show off in the resources in Chrome, except for those. But it doesn't throw any errors. Only errors are in Edge / IE.


Solution

  • It seems that AppCache is working, but it simply throws an error stating that it is not.

    When I look into the network explorer tab in Edge, it actually says that it's serving the video from cache! So it looks like it is working. Not sure what the error is, or why it is throwing one for AppCache, so I'll just disregard it for now.

    enter image description here