Video Essentials
Apart from sliders and galleries with too many oversize and unoptimised images the biggest cause of slow page download is video.
- Use self hosted MP4 video in preference to Vimeo or YouTube
- The player must display a poster image on page load
- Use an MP4 video player which loads a smaller file for mobile devices
- Video files should be prevented from downloading at page load
- Vimeo and YouTube have poor download efficiency
- If Vimeo or YouTube is a must - use lazy loading
- If two or more videos are inserted provide an auto pause function
- Poster images must have the same aspect ratio as the video file
- Keep poster images as small as possible and optimise them
- In general the video file's width should be about half that of the containers max width.
Hosted Video
Hosted video such as Vimeo and YouTube dowload a whole bunch of assets a page load even if the video isn't played.
If the video is hosted on Vimeo or YouTube, download the file in two sizes as MP4 to self host them and provide a link to the online version.
The player assets and the video file create a whole bunch of remote server requests that effect download performance.
Check out the info page for more about page download speed …