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.
The internet feels like a place where your location doesn’t matter. We’re used to seeing content & interacting with people from around the world. And no matter where you are online it feels like every site is equally close.
One concept that might surprise new website owners is that the location of your web server matters. I live in Denver Colorado and if I want to access a web server in Denver it’s going to be much faster than one in Europe, South America, or Asia.
To illustrate this let’s do some speed tests around the world. My web server is in South Carolina. On the east coast of the US. So let’s test our site with a couple of different locations to see how much it could help.
I’ll be using the KeyCDN speed test since they make it really easy to test locations.
New York – 800 ms
London – 1.59 s
Bangalore – 3.12 s
Tokyo – 3.85 s
If your server is a half continent away it could add a 1/2 second easy. If it's on the other side of the world it could add 1-2 seconds.
My advice to you is to make sure your webserver is located in the same continent as your audience – or the largest chunk of your audience.
Since I’m catering to a US audience with my site I’m very happy where I am and don’t need to change anything. If you are thinking about moving server locations first ask your host because they likely have a server location closer to your customers and it’s much easier to move between data centers than to setup a whole new hosting account.
It’s important to remember that hosting directly affects the initial page load. And it's worth investigating even if it is incredibly time-consuming and possibly expensive to change.
Speeding up your website is exciting but before you start adding a caching plugin to your site it’s good to think about the whole process of building a web page. Because each part of building and rendering a web page can be done efficiently and fast OR inefficiently and slow.
One of my favorite things to do is collect data. I love collecting ALL the data because you never know when you need it and if you collect it you'll always have it when someday you could find a use for it. This brings me to one of my favorite quotes:
“What gets measured gets improved.”
Robin S. Sharma (inspired by Peter F. Drucker)
There’s some truth to this. And lucky for us website speed is easy to measure, breakdown, and analyze. And this is important because what works for one site might not work for another. So if you're looking to improve your site speed we always want to measure & confirm our sites are getting faster.