Question

We're hosting a couple of HTML5 games that utilise the offline.appcache feature letting games cache a lot better.

To serve the .appcache type however, I had to add the mime type to the server (IIS7) so it wouldn't 404. When I do, it refuses to serve any images or CSS files! The error sent to the browser when I request a CSS or image file is:

The page cannot be displayed because an internal server error has occurred.

The extension I am adding is appcache with the MIME type text/cache-manifest.

Any ideas why it's causing this behaviour?

Was it helpful?

Solution

Finally figured it out, I added the mime type on server level not site level. One of the sites already had that mime type defined. Which caused a conflict. But bizarrely the site with the dual definition was fine, it was the other sites that failed.

OTHER TIPS

I ran into a similar issue when adding the .appcache. All .js and .css file requests responded with an error from IIS. I realized it was because I had not specified a NETWORK: section.

My working .appcache now forces all files to be refreshed and doesn't cause errors:

CACHE MANIFEST
# cache version 1.0.0.6

NETWORK:
*
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top