Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Application Cache Error event: Resource fetch failed (-1)

I am trying to store a mp4 video file (rather small ~ 2.5MB) in the local app cache.

Manifest looks like:

CACHE MANIFEST
viddy.mp4

Chrome (22.0.1229.94 m) will log the following in the console:

Creating Application Cache with manifest http://example.net/cache.manifest
Application Cache Checking event
Application Cache Downloading event
Application Cache Progress event (0 of 1) http://example.net/viddy.mp4
Application Cache Error event: Resource fetch failed (-1) http://example.net/viddy.mp4

When I click the link right next to the Error it's opening the file quite fine.

My manifest is served with the correct MIME-type (I'm using the HTML5 Boilerplate .htaccess-file) and the video is served Content-Type:video/mp4

Is my file too big? I am perfectly able to cache a 1MB image this way, so I thought filesize should not be a problem? Safari on desktop and iPad does cache the video just fine.

Remark: I have seen this question but it does not cover my problem as the solution seemed to be something Python-related.

like image 497
m90 Avatar asked Oct 18 '12 13:10

m90


2 Answers

Chrome does not allow data to be stored in Incognito Mode.

like image 139
Crystal Miller Avatar answered Oct 13 '22 23:10

Crystal Miller


I experienced similar problem and this is how I solve it. In this case Chrome does not give any helpful information about error. I've tried to load same page in Safari (Mac, but Windows should work as well), and I got description, that response for specified resource returns 302 (Redirect) and HTML5 Application Cache cannot handle it.

In your case it might be the same, but I'd suggest you to enable the sniffer and see, what response you get from your resource. If it's different than 200 - you figured the issue.

P.S. I've cached files up to 32 MB without any problems.

like image 42
Sergey Galchenko Avatar answered Oct 13 '22 22:10

Sergey Galchenko