3

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?

Tom Gullen
  • 61,249
  • 84
  • 283
  • 456

2 Answers2

1

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.

Tom Gullen
  • 61,249
  • 84
  • 283
  • 456
  • Can you clarify this? I added the mime type at site level and it broke all css and js requests, but only for the site I added it to. Any ideas? – Jesse Lee Aug 14 '14 at 17:48
  • [How to add mime types with IIS7 Web.config](http://blogs.iis.net/bills/how-to-add-mime-types-with-iis7-web-config) – Siriquelle Jul 21 '15 at 09:07
0

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:
*
Jesse Lee
  • 1,291
  • 1
  • 8
  • 20