Force / allow caching of the video in Google Chrome

I'm writing a web application that dynamically loads the video (insert tag <video> inside the container <div> ).
There is a small number of videos that appear repeatedly.
Let's say I have video1.mp4 and video2.mp4. A script will insert the tag <video> (auto-start) for video1.mp4 to wait a while (setTimeout), and then clear the contents of the container <div> . Later video2.mp4 gets the same treatment. After some time video1.mp4 displayed again.
The problem I am facing is that the video will not be cached and downloaded every time they are displayed. I want to avoid it.
I tried the "Expires" and "Cache-Control" in response to the video and http containing html-page. Also we try to add them as metadata in a html-page headline contained.
Any ideas?
Thanks!

+4
source share
1 answer

Maybe you should try your app's cache: http://html5doctor.com/go-offline-with-application-cache/ and cache only the video ...

0
source

All Articles