Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Application Cache manifest file errors with Windows/NTLM authentication

How are browsers implementing requests for Application Cache manifest files and is it different from how other files are requested?

I ask because I'm seeing behavior I wouldn't expect when using Windows/NTLM authentication in IIS 7. The situation is that I have a site with a manifest file defined. With anonymous authentication, everything works as expected -- the site loads and is available offline.

When I disable anonymous and enable Windows authentication, the site will load fine after authenticating, but I will see an error in the console (in Chrome or on an iPad 2) that says the manifest file could not be fetched.

On the iPad, the error is that the Application Cache file could not be fetched. In Chrome, the specific error is "Application Cache Error event: Manifest fetch failed (401)." I can see the 401 response code in the web server logs in both instances.

Why this behavior seems unexpected is requests for all other resources (CSS, JavaScript, images) all work as expected. Also, I can browse to my .appcache file and it loads.

Can anyone explain what's going on?

Has anyone else run into this and found a solution?

like image 955
Mattio Avatar asked Mar 18 '26 18:03

Mattio


1 Answers

Not sure if this is still relevant, but I'm also having this problem.

As my site makes AJAX requests, once the page has loaded I am asked for credentials for the request to take place. Once this has happened, running applicationCache.update() causes the application cache to update correctly.

Therefore, as a work around, perhaps try making an AJAX request to something so that the user is prompted for credentials, then call applicationCache.update().

like image 157
Hayden Ball Avatar answered Mar 24 '26 09:03

Hayden Ball