One of the quickest wins—and one of the first things I recommend my clients do—to make websites faster can at first seem counter-intuitive: you should self-host all of your static assets, forgoing others’ CDNs/infrastructure. In this short and hopefully very straightforward post, I want to outline the disadvantages of hosting your static assets ‘off-site’, and the overwhelming benefits of hosting them on your own origin.
For the site tested, this resulted in a ~300ms win:
One of the main reasons for me is that you, as developer, stay in control of everything. I’ve had sites break due to some external files no longer being available.