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

2

8

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.

Sciolism answered 18/10, 2012 at 13:48 Comment(0)
G
8

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

Goulet answered 26/2, 2014 at 21:12 Comment(1)
You made my day! txBiogen
W
4

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.

Wolfy answered 20/11, 2012 at 20:52 Comment(3)
Thanks for the answer, although this does not seem to be the problem for me. What I noticed is that this only occurs when using an "Incognito"-Window in Chrome. When using a "standard" window it works just fine. Probably a "bug" (by design?)Sciolism
@Sciolism I can confirm, that the error occurs in incognito mode by chrome, I got the same error only in incognito mode.Gorton
I saw that I indeed got a 206 in stead of a 200, which jetty returned for my 6.8Mb file: "GET /dtpet2/my6.8mbfile.geojson HTTP/1.1" 206 1Pouf

© 2022 - 2024 — McMap. All rights reserved.