DOGFACE

Sustainable website builder

Netlify hosts your website

If you have ever deployed a website in Netlify using the conventional SSG / GITHUB route, you will know that it can take several minutes depending on how many pages are in the website.

Static Site Generators typically create all of the website's pages and assets in a Github repository before Netlify connects to the repository, downloads the files and completes the deployment.

Netlify will only upload those files to its CDN which have changed since the last deployment, which it identifies by first sending an array of computed hash values for ALL of the files (changed and unchanged). 

These hash values are quickly transferred to a Netlify database server which compares the received hash codes to those previously deployed, returning an array of codes for only the new and changed files, which are then uploaded to the CDN. 

Imagine that the database in Netlify has 2 tables:

  1.  One table has 2 columns - the hash code and the content with each row uniquely identified by the hash key.
  2. A second table contains all of the hash codes for a specific website.

In this way, Netlify is able to store the unique content for a file only once in its database. If 1000 websites all use the exact same Javascript file, its content is only stored once and referenced 1000 times.

ES Javascript Modules

All modern web browsers now support Javascript ES modules. The old days of delivering monolithic scripts or combining multiple scripts should soon be over.

However, most popular website builders still deliver complete scripts even when most of the functionality included in the script isn't actually required. According to the 2024 Web Almanac, Javascript has now become the largest component downloaded by most websites ... even more than images!

Let's see how use of ES modules can drastically reduce the amount of javascript shipped to clients conecting to our websites.

All of our sites include the functionality to securely log in. Website owners can then edit page content directly within the site. Normal visitors can also log in, but they can only leave a review.

Our goal is to ship the minimum amount of javascript required to perform functionality requested by the client.

It is only when visitors click the log in button that we ship the javascript and html code required to  perform this specific function. 

Sign up or log in