How to build an optimized website in 2022, Part 1 — Deployment

Choose the right deployment provider!

You may be questioning these:

HTTP/3 support

It’s 2022 already, you should start your new website with HTTP/3 support 😥.

Edge computing

On the first day, we serve static HTML files 📁.

Pages

Whenever you wanna start a new website, you should think about the Pages providers first. You clearly don’t want to set up a huge distributed autoscaling clustering serverless cloud computing network worldwide 😵.

Incremental rendering

Let’s answer these questions:

  • Is your database change regularly or never change?
  • What if you pre-render the whole database into HTML files and push them to Github Pages? 🤔

Caching

You should never try to cache the database query results or any intermediate results.

  • How about semantic tags 💡? Stop using so many divs! An intro to semantic HTML.
  • Did you embed all JS and CSS into a single HTML output 😐?

Concurrent server-side

Sometimes, your API needs to fetch data from several other endpoints. Did you just await fetch every single one of them? 😖

Promise.all([<fetch 1>, <fetch 2>, …])

Continuous Integration frequency

Do you build a new website preview on every release? every pull request? or every new commit?

Monorepo support

Monorepo is a must in recent years because it follows the Single source of Truth 👊.

References

https://blog.cloudflare.com/http3-the-past-present-and-future/

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store