HTML preload Attribute: This attribute permits the author to provide a hint to the browser about what the author thinks will lead to the best user experience. It specifies if and how the author thinks that the media file should be loaded when the page loads.
HTML preload Attribute
This attribute can be applied on <audio> and <video> elements. And the preload attribute is ignored if autoplay is present.
Syntax: <video preload=”none”>
Browser Support
This attribute is supported by the following browsers:
- Chrome-4.0
- Firefox-4.0
- Safari-4.0
- Opera-10.5
- Internet Explorer- doesn’t support when <video> element is used.
Example: for <audio> element
<!DOCTYPE html> <html> <body> <audio controls preload="none"> <source src="horse.ogg" type="audio/ogg"> <source src="horse.mp3" type="audio/mpeg"> </audio> </body> </html>
Example: for <video> element
<!DOCTYPE html> <html> <body> <video width="320" height="240" controls preload="none"> <source src="movie.mp4" type="video/mp4"> <source src="movie.ogg" type="video/ogg"> Your browser does not support the video tag. </video> </body> </html>