mondoman22
New Member
I'm writing a web app that dynamically loads videos (inserting a \[code\]<video>\[/code\] tag inside a \[code\]<div>\[/code\] container).
There is a small amount of videos that get showed repeatedly.
Say I have video1.mp4 and video2.mp4. A script will insert a \[code\]<video>\[/code\] tag (with autoplay) for video1.mp4 wait some time (setTimeout) then clear the content of the \[code\]<div>\[/code\] container. Later video2.mp4 gets the same treatment. Some time later, video1.mp4 gets shown again.
The problem I'm experiencing is that the videos will not get cached and are downloaded each time they are shown. I want to avoid that.
I've tried the "Expires" and "Cache-Control" in the http response for the videos and the containing html page. Also tried adding those as meta in the html header of the containing page.
Any ideas?
Thank you!
There is a small amount of videos that get showed repeatedly.
Say I have video1.mp4 and video2.mp4. A script will insert a \[code\]<video>\[/code\] tag (with autoplay) for video1.mp4 wait some time (setTimeout) then clear the content of the \[code\]<div>\[/code\] container. Later video2.mp4 gets the same treatment. Some time later, video1.mp4 gets shown again.
The problem I'm experiencing is that the videos will not get cached and are downloaded each time they are shown. I want to avoid that.
I've tried the "Expires" and "Cache-Control" in the http response for the videos and the containing html page. Also tried adding those as meta in the html header of the containing page.
Any ideas?
Thank you!