Since users are spending increasingly short amounts of time on each website they visit, tools such as CDN (content delivery networks) and caching are increasingly vital when it comes to capturing and converting visitors.
The faster your site is, the more time you have to impress and convert a visitor and the better the experience these potential customers will have.
There are a lot of ways to optimize site performance. You can set up basic caching for your database or, even more intense, use external API calls to reduce the pain points of a request. This will compress and optimize your client-side assets and speed up delivery. It will even tie delivery of specific assets into a CDN, reducing network latency for your visitors.
An increasingly popular option is to host such sites inside a “CDN service.” Available options are not usually branded, typically consisting of generic storage services that can be accessed via an affiliated network. Here are some examples of how to do this on a couple different platforms:
Both approaches are fairly similar:
1) Upload your static site, complete with index.html, to the storage service.
2) Configure a container to be publicly accessible via the CDN
3) Configure your DNS with a CNAME record, pointing to the CDN URL.
Deploying further changes to your static sites should just be a matter of making the changes and uploading them. You can write a simple deployment script to manually POST up the file changes to your provider’s API based on your detected SCM changes or, if you like things a bit more low tech, you could always mount the cloud container locally using something like Cloudfuse or Bonkey.
You should see changes taking effect as soon as your DNS record is in place and the CDN has propagated your file changes. Rather than paying for an entire server to host your content, you’re now only paying for storage and bandwidth costs for your static assets.
This configuration should give you one of the best site load times possible, as well as a much cheaper alternative to traditional hosting.