Name is required.
Email address is required.
Invalid email address
Answer is required.
Exceeding max length of 5KB

Firefox + JW Player: Looped video does not get cached


When using JW Player to show a webm video on a HTML page in a loop, Firefox re-downloads the video again and again for each loop that gets played.

This does not happen in Firefox with a plain <video> tag, and it does not happen with Chromium and JW Player.

Demo:

1. http://tmp.nrdev.de/AFL-398-jwplayer/jwplayer.html
Open this file in Firefox, enable the Firebug's network tab, and you'll see that the webm file gets re-downloaded again and again.
Proof: http://tmp.nrdev.de/AFL-398-jwplayer/screenshots/firefox-jw.png

In Chromium, it gets downloaded only once.
Proof: http://tmp.nrdev.de/AFL-398-jwplayer/screenshots/chromium.png

2. http://tmp.nrdev.de/AFL-398-jwplayer/plain-video-tag.html
Open this file in Firefox, and the video gets downloaded only once.
Proof: http://tmp.nrdev.de/AFL-398-jwplayer/screenshots/firefox-plain.png

So we have the problem here that people using Firefox are re-downloading the video again and again, hogging their own and our server's bandwith.

This happens with JW Player 6.3.3242 (we noticed that on 5.10, too).

15 Community Answers

Ethan Feldman

JW Player Support Agent  
0 rated :

Yes, I’m afraid we don’t cache videos. You can use onTime though and check the video a second before the end, then start from the beginning again, to work around this – http://www.longtailvideo.com/support/jw-player/28851/javascript-api-reference

JW Player

User  
0 rated :

But why do all browsers except Firefox cache the video?

Ethan Feldman

JW Player Support Agent  
0 rated :

This seems to be more of a Flash vs HTML5 thing, actually.

JW Player

User  
0 rated :

All browsers I've tested it with are using the HTML5 video tag and not flash.

Ethan Feldman

JW Player Support Agent  
0 rated :

FF fails back to Flash because it doesn’t support MP4…

JW Player

User  
0 rated :

@Ethan - You appear to have gone off on a rather strange tangent... All references Christian has provided so far indicate that he is testing WebM in Chrome and Firefox - hence HTML mode!

@Christian - What version of FF are you using (& what OS). I've check on FF 20.0.1 (on Win) and the only things repeatedly requested are the "ping" images JW uses for tracking data.

Ethan Feldman

JW Player Support Agent  
0 rated :

Sorry, I missed that!

JW Player

User  
0 rated :

I'm using Firefox 20.0 on Linux (Ubuntu 12.04). Both Firebug and Firefox' in-built network inspector show that the file gets re-downloaded again and again.

I tested some more:
- I cannot reproduce the problem with Firefox 20.0.1 on Windows XP.
- I cannot reproduce the problem with Firefox 20.0 on Linux (Ubuntu 12.10).

So it seems it's a problem with my old Ubuntu version and now jw player. Thanks for looking, though.

JW Player

User  
0 rated :

Wait. Ubuntu 12.10 and Firefox 20.0 have this problem.

JW Player

User  
0 rated :

I also tried it with Firefox 20.0.1 on Window 8 and can reproduce the problem:

Open the in-built developer tools, go to the web console, enable the "Net" mode. You will see that the .webm file will get reloaded again and again, that takes > 400ms for the 326kiB here.

Ethan Feldman

JW Player Support Agent  
0 rated :

Ok, so it looks like the player isn’t catching the webM? Is that correct?

Ethan Feldman

JW Player Support Agent  
0 rated :

caching*

JW Player

User  
0 rated :

Yes. The webm file does not get cached. It gets re-downloaded every time the video starts again.

Ethan Feldman

JW Player Support Agent  
0 rated :

Ok, we can look into this.

JeroenW

JW Player Support Agent  
0 rated :

Hmm, this looks like an issue with Firefox though. There’s nothing we can do to force caching of the file. We did make sure to not tag any querystring headers or stuff to the player.

This question has received the maximum number of answers.