
When a site loads slowly, the advice almost always includes two words: caching and CDN. It sounds technical, but the idea is simple: do not redo the same work for every visitor, and serve files from a server close to the person.
Below is how it works, what it gives a small site, and where caching can do harm.
Caching in plain words
A cache is a saved copy of a finished result. A visitor's browser can remember images, fonts, and styles and not download them again on the next page. The server can keep an already assembled page and not rebuild it from the database on every request.
For the visitor this means the second and later pages open noticeably faster, and for the server it means less load, especially when many people arrive at once.
What a CDN is
A CDN is a network of servers in different cities and countries that keep copies of your site's files. A person gets images and scripts not from your hosting but from the nearest node. The farther the visitor is from the hosting, the bigger the difference.
Many CDNs also protect against simple availability attacks and issue an HTTPS certificate themselves, so they get connected not only for speed.
When you really need it
- Visitors come from different regions or countries, while the hosting is in one place
- The site has lots of photos, video, or heavy files
- Traffic spikes happen, for example after a newsletter or an ad campaign
- Pages are built on the server for every request and respond slowly
If the site is small, the audience is in one city, and the pages are static and light, good hosting with proper browser caching is often enough. Choosing hosting has its own post.
Mistakes that hide your updates
The main complaint about caching sounds like this: "I changed the text, but the site still shows the old one." Usually an old copy is kept too long and nobody cleared it. A proper setup looks like this:
- Style and script files carry a version tag in their name, so the browser downloads the new file after each update
- Pages themselves are cached briefly or with a check for changes
- The CDN cache is cleared automatically after publishing, not by hand from memory
- Personal pages, the cart, and forms never go into the shared cache
The last point matters for security: a configuration mistake can show one visitor another visitor's data.
Where to start
First, measure where the site loses time: a slow server response, heavy images, or too many extra scripts. Images are often the main problem, covered in detail in why a site loads slowly on a phone. Caching and a CDN come after that, once it is clear what exactly they will speed up.
Caching, CDN setup, and speeding up a site are part of speed and SEO. If you want to find out what slows your site down, get in touch.