Does Publican make your site fast?
1,190 words, 6-minute read

Publican can build a site however you want. It primarily creates HTML pages (or mostly static templates), but you can add PHP code, frameworks, CSS, JavaScript, and any other assets you require.
This site – Publican.dev – is built using Publican. It implements web standards and best practice techniques to ensure the site remains fast, usable, and secure. The techniques can be adapted for your sites.
Pre-built server rendered HTML #
In previous years, there was a move toward Single Page Applications (SPAs). An HTML page – typically with no content – loaded JavaScript which took over responsibility for routing and content updates. This can have benefits for complex applications, but it often goes too far:
- A JavaScript or connectivity error can result in a blank screen.
- Developers must re-implement standard browser features that SPAs break – such as URLs, the back button, refresh, etc. They rarely worked as expected.
- SPAs can be slower than server-rendered and streamed HTML content, especially on the first page visit.
- Search engines find it more difficult to index the content.
Few content sites need to be an SPA. Some complex apps can benefit from a simpler multi-page approach when users navigate to different sections.
I prefer a progressive enhancement approach to web development:
- Use semantic HTML to build a base experience.
- Add a layer of CSS to enhance that where possible.
- Add a layer of JavaScript to make further enhancements when necessary.
A site works on modern devices but will continue to work when something fails in old – or future – browsers. And something will fail for someone, somewhere, at some point. Progressive enhancement provides resilience.
HTML-first performance #
Web performance is generally woeful. The average page:
- downloads more than 2.5Mb of assets
- makes more than 70 requests
- uses 600Kb of JavaScript, and
- takes up to 6 seconds to appear.
JavaScript is usually the main culprit for poor page performance. It may need to be downloaded, parsed, and executed before con tent appears. Developers often attempt to solve it by adding more JavaScript which compounds the problem.
It need not be that way. A typical page on Publican.dev:
- appears in one third of a second on an average connection
- downloads less than 50Kb of compressed assets (typically less than 150Kb when decompressed)
- requires less than 10KB of CSS and 2KB of JavaScript
- uses available OS fonts rather than downloading web fonts
- has very few images – most are SVGs and highly compressed AVIF files.
- implements speculation rules to make the next page load even faster.
Chrome’s Lighthouse tool and PageSpeed Insights give Publican.dev a 100% score for performance, accessibility, best practices, and search engine optimization on most pages.
Not all sites will have such low requirements. Publican won’t magically create a fast site, but you have full control over the assets you add.
User friendly #
Publican.dev strives to be accessible:
- The theme defaults to your OS’s preferred light/dark mode or you can select the option you prefer.
- URLs are readable. Every page and content section is linkable.
- Navigation is provided across menus, in sections, in pages, with back/next buttons, and related post links.
- Pages can be shared on social media, messaging apps, and notebooks using lightweight non-trackable links that continue to work without JavaScript.
Device friendly #
Publican.dev works on most mobile, tablet, and desktop devices. The experience, text size, and layout may change, but content remains readable.
Printer friendly #
It’s unlikely you’ll print pages from Publican.dev, but press Ctrl | Cmd + P and examine the preview or save a PDF. Content is optimized for printing and will use considerably less ink and fewer pages.
You can usually make web pages printable with a few hours development. Few sites do?
Search engine friendly #
Publican.dev provides clean URLs, meta tags, structured data, tagged content, robots.txt
, sitemaps, RSS feeds, and social media sharing. Good performance also influences search engine rankings.
A Publican-built static site won’t wondrously jump to #1 in Google, but there are no factors that could stop it happening.
Environmentally friendly #
The average web page emits 0.8g of CO2 per view. Many are considerably higher. Every year, that equates to an electric car driving 900 miles and requires five trees to absorb the carbon.
Publican scores A+ on the Website Carbon Calculator. It’s in the top 1% of sites, and emits 80x less than average with just 0.01g of CO2 per page view. The whole site requires one tree to absorb the carbon. My garden’s enough!
Security aware #
Publican.dev does not store session data or track users. It scores A+ on Mozilla’s HTTP Observatory tool which analyzes web security compliance.
The site is difficult to hack:
- It’s static HTML. There’s no server-side language, framework, CMS, or database.
- It’s served by Cloudflare Pages which provides a fast, secure, and scalable network.
The main risk is someone gaining administrative access to my Github or Cloudflare accounts. Even then, the site could be re-built and served from elsewhere in minutes.
Cost effective #
Hosting costs are – or certainly should be – minimal for static sites. You just require a server that can host files with enough bandwidth to cope with traffic.
You can still use a CMS and database, but that could be hosted on an intranet, your own PC, or even a Raspberry Pi without external access. The results of the build can be pushed anywhere.
Summary #
Web technologies have radically improved over the past decade. Sites need less code and fewer images than ever, but web page weight continued to increase. I don’t believe the average website has become more sophisticated – we’re just adding more unnecessary bloat.
We’re finally seeing a backlash against poor website performance. Static site generators such as Publican are key tools that could help.
Get started #
The Publican documentation provides a quick start guide, a detailed set-up guide, API references, and common recipes you can use and adapt for your own projects.