---
url: https://docs.artemsemkin.com/velum/html/ship/hosting-and-speed.md
description: Set the host up so the site loads fast.
---

# Hosting and speed

The template is static files: any host that serves files runs it, and only the contact form needs PHP. How fast a page arrives depends mostly on three things the host and you control: how many files it can send at once, whether it compresses them, and the size of your pictures.

## What a page loads

Every page's head loads the same 20 files: six stylesheets and fourteen scripts, about 1.4 MB as they are on disk. Then each component on the page loads its own script, in small files from `components/`: the home page asks for 38 of them. Pictures load as they come near the screen, except the first ones a page shows, which load at once.

| Files | On disk | Compressed with gzip | With Brotli |
| --- | --- | --- | --- |
| The six stylesheets | 698 KB | 83 KB | 62 KB |
| The fourteen scripts in the head | 738 KB | 246 KB | 218 KB |

After the first page, a visit through an AJAX transition loads only what the next page adds: its HTML, its pictures and the components the first page did not have.

## HTTP/2

With HTTP/1.1 a browser fetches a few files at a time from one site; with HTTP/2 it fetches all of them over one connection at once, which suits a page of many small files like these. Browsers speak HTTP/2 only over HTTPS, so serve your site over HTTPS. To check yours, open Chrome's developer tools on your site, then the **Network** panel, and right-click the table's header to show its **Protocol** column: `h2` or `h3` is what you want, `http/1.1` is worth a question to your host.

## Compression

Stylesheets, scripts and pages are text, and a host that compresses them sends a fraction of their size, as the table shows. Brotli compresses a little smaller than gzip, and browsers ask for either. Check one file of your site: in the **Network** panel, click `css/main.css` and read its **Content-Encoding** response header. `br` or `gzip` means it is compressed; no header means it is not, and your host's panel or support can turn it on. Pictures and videos are compressed already and gain nothing from it.

## Picture sizes

The pictures are most of what a page weighs. The template shows each one at the size of its file, with no smaller copies for smaller screens, so export each at the size its placeholder states, compressed: [Pictures and video](../content/pictures-and-video).

## AVIF through an image CDN

The pages name JPEG files. AVIF pictures are much smaller for the same look, and an image CDN can send them without a change to your pages: it sits in front of your host, reads which formats the visitor's browser accepts, and converts each picture on the fly, keeping the JPEG for a browser without AVIF. [Cloudflare Images](https://developers.cloudflare.com/images/) is one such service. Ask your host or the CDN which of its plans does it.

Next: [Updates](./updates).
