HTML Audio/Video DOM preload Property
HTML Audio/Video DOM Reference
Example
Start loading the video as soon as the page loads:
myVid=document.getElementById("video1");
myVid.preload="auto";
Try it »
Definition and Usage
The preload property sets or returns whether to load the audio/video immediately after the page loads.
The preload property allows the author to provide a hint to the browser about what he/she thinks will lead to the best user experience. This property may be ignored in some cases.
Browser support





All major browsers support the preload attribute.
**Note:** Internet Explorer 8 and earlier versions do not support this property.
Syntax
Set the preload attribute:
audio|video
.preload="auto|metadata|none"
Return the preload attribute:
audio|video
.preload
Attribute values
| Value | Description |
|---|---|
| auto | Indicates that the audio/video starts loading once the page loads. |
| metadata | Indicates that only the metadata of the audio/video is loaded after the page loads. |
| none | Indicates that the audio/video should not be loaded after the page loads. |
Technical Details
| Return Value: | A string value, auto|metadata|none |
|---|
HTML Audio/Video DOM Reference