Reputation: 5197
I have a VIDEO tag loaded with a "src" attribute set to a particular filepath to a video asset. I have an array that stores some number of other filepaths to different video assets. I have a button that, when clicked, instructs the VIDEO tag to load one of the filepaths in the array.
If the VIDEO tag loads an asset that it has already loaded in the past (during this same page session) does it have to go back out to the network and redownload that asset as if it never downloaded it before or will it realize that it has cached this file and just pull the data from the cache?
Upvotes: 0
Views: 81
Reputation: 14489
You should be able to use HTML5's caching manifest to instruct the browser to load from cache. Read more about it here:
http://www.whatwg.org/specs/web-apps/current-work/multipage/offline.html#manifests
Basically, you specify:
<html manifest="manifest.cache">
and then define what resources are cached in a manifest.cache file:
CACHE:
path/to/your/video/file
Upvotes: 0