Dofactory.com
Dofactory.com
Earn income with your HTML skills
Sign up and we'll send you the best freelance opportunities straight to your inbox.
We're building the largest freelancing marketplace for people like you.
By adding your name & email you agree to our terms, privacy and cookie policies.

HTML <video> preload Attribute

The preload attribute on a <video> element specifies if and how the video file is loaded after the page loads.

The preload value is ignored if the video is set to autoplay.

Example

#

A preload attribute on an <video> player.
The preload option is none. The video is only loaded when the start button is clicked.

<video width="320" controls preload="none">
  <source src="/media/movie.mp4" type="video/mp4">
  <source src="/media/movie.ogg" type="video/ogg">
</video>

Using preload

The preload attribute specifies if and how the video file is loaded after the page loads.

This attribute can specify that the video file is loaded even if it is never used.

The preload setting is ignored when autoplay is enabled.


Syntax

<video preload="auto | metadata | none">

Values

#

Value Description
auto Loads the entire video file when the page loads.
metadata Only loads video metadata when the page loads.
none Indicates that the video file will not be preloaded.

Note: Each browser has its own default value for preload. For consistency the metadata setting is a reasonable option.


Browser support

Here is when preload support started for each browser:

Chrome
4.0 Jan 2010
Firefox
4.0 Mar 2011
IE/Edge
9.0 Mar 2011
Opera
10.5 Mar 2010
Safari
3.1 Mar 2008

You may also like

 Back to <video>

Last updated on Sep 30, 2023

Earn income with your HTML skills
Sign up and we'll send you the best freelance opportunities straight to your inbox.
We're building the largest freelancing marketplace for people like you.
By adding your name & email you agree to our terms, privacy and cookie policies.

Guides