- Why Website Speed is Important
- How to Check & Monitor Your Website Speed
- How Websites Slowdown
- Optimizing Static Vs Dynamic Sites
- How Hosting Affects Your Website Speed
- Server Location Matters More Than You Think for Website Speed
- Optimize Images
- Why You Should Always Use a Content Delivery Network (CDN)
- Offload Audio & Video Files
- Lazy Websites are Fast Websites
- Yes, Your Theme Can Affect Site Speed
- WordPress Plugins: Quality over Quantity
And just like JS, CSS, & images which can be handled by CDNs we want to offload audio & video files to external services to reduce the load on your web server and to have locations around the world to serve these files from the closest location.
Offload Audio Files
First, let’s talk about audio because there’s a very straightforward way to optimize those files.
I run a podcast for board game designers and each individual post embeds the podcast episode as an mp3.
With WordPress you actually can upload all of these audio files to your own web server and run a podcast directly from your WordPress site. While this might sound great to save costs it will eventually fill up all of your webhosting & your site will slow down when hundreds or thousands of people download the new podcast episode at the same time.
Podcast services are great if you have new audio files to upload every month. But if you have a one off file you might want to look into a service like Soundcloud that will let you upload 3 hours of audio for free.
Most of these services will cost a little money each month but they completely solve the problem by offloading the audio to a separate service. This reduces the load on your own server and they'll be distributed around the world so users will download it faster.
Offload Video Files
You should treat video like audio. You want to use a service instead of hosting the video on your own server. And in recent years we’ve been spoiled.
We have to start with YouTube which is entirely free to use & upload video. When you embed a YouTube video on a page or post WordPress knows exactly what to do. It will include a thumbnail for the video, it's fully responsive so will fit any browser size, and only after someone clicks the video will it start loading & playing.
YouTube is great for most users but you may also want to check out Vimeo which is a paid service. They has slightly better compression meaning your video will be a bit smaller on their service, they have prestige because it's a paid service, they have less strict content moderation, and they give you options to customize the video player itself.
Just a note on video scripts. While both YouTube & Vimeo don't start loading the video itself right away they usually include some JS and CSS files which are necessary to play the video. So there is a small speed cost just including the video itself.