If you’re a local business targeting a local geographic area, it may not matter much. But, if many of your customers come from different parts of the world, you can improve website performance by using a CDN (Content Delivery Network). Basically, website assets like images and videos can be referenced in your code to come from a CDN instead of the same server hosting your web pages. If a user is viewing your website from the US, then the website’s assets will be downloaded from a fast server near the US. Similarly, is a user is viewing your website from Europe, then the website’s assets will be download from a fast server near Europe. Though CDNs used to be expensive, they’re cheap now. Amazon offers a cheap and easy-to-use CDN called CloudFront where you pay per use. Here’s one way to set it up:
- Create an Amazon Web Services (AWS) account.
- Upload your assets (images, videos, etc) to Amazon S3 (storage)
- Create a distribution in Amazon CloudFront to reference the assets in Amazon S3
- Use the Amazon CloudFront URL when referencing your assets in your HTML