POLAKO / Blog

Architecture · 23.11.2026

A fast site starts with understanding the browser

What to load first, what can wait, what's static and what really has to be computed per visitor. The decisions that decide speed – and whether a site survives peak traffic.

A browser doesn't draw a page all at once. The HTML arrives first; from it the browser learns what else it needs – styles, fonts, scripts, images – and only once it has enough does it paint the first screen. Every decision about what lives in the HTML and what arrives later directly affects how fast visitors see content and how much work your server does.

What should arrive first

  • First-screen content inside the HTML itself. The headline, the main text, the first image. If JavaScript has to assemble it, the screen stays blank until scripts download and run.
  • Critical styles early, the rest later. One small CSS file blocks rendering for less time than five large ones.
  • The main image with priority (fetchpriority="high"), images below the fold with loading="lazy".
  • Scripts with defer. They don't block painting and still run in order.
  • Ads, analytics and chat widgets – last. Third parties are the most common reason for a slow site, and visitors don't need them to see the content.

Not everything has to be dynamic

Modern frameworks make it easy to render every page on the server for every visitor. That's convenient for developers but expensive at peak: a thousand visits means a thousand identical computations and a thousand database queries. For every part of a page it pays to ask: how often does this actually change?

  • Almost never (about, terms, landing pages) – static HTML, generated at publish time.
  • Rarely (countries, cities, categories, price lists) – a JSON file on the CDN, cached for hours or days.
  • Often, but the same for everyone (listings, news) – server-rendered HTML, cached briefly on the CDN and refreshed in the background.
  • Different for every visitor (cart, profile, messages) – only this needs to be dynamic.

Login state doesn't have to break your cache

A common reason a whole page can't be cached is one tiny part: the corner says “Hi, Mark” instead of “Sign in”. Because of those few words, the entire page is computed from scratch for every visitor.

A better approach: the page is identical for everyone and comes from the cache, and the small login-state part is fetched separately by the browser – one tiny request (e.g. /api/me) – which fills in the corner. Within a few dozen milliseconds the user sees their name, and the server answered with a few bytes instead of a whole page.

The same goes for the cart, the unread-message count or saved items: a static shell, personal details afterwards.

How to tell where you stand

Open your site, then the browser's developer tools (F12) and the Network tab. Look at how long the first request (the HTML) takes, how many requests there are in total, how many megabytes, and which requests repeat on every page even though the content doesn't change. That's a good start – and an audit gives you the full picture.

Want to know where your site's limit is?

Audit from €990, fixed price. We start by asking how you run things today.

Request an audit →

Blog

Read more

Basics

QA, environments and Gitflow: getting code to production without surprises

Customers only ever see one environment – production. Three more sit backstage, and that's where all the work and all the mistakes should happen. The basics any team can introduce step by step.

Read →
Architecture

Message queues: why ticket checkout and chat shouldn't hang on a single call

SNS, SQS and similar message queues split a system into parts that don't fail together. And when something goes wrong, there's a trail: what happened, in what order, and when.

Read →
High traffic

Ticket drops, launches, flash sales: surviving the second everyone clicks at once

A concert ticket drop or a product launch is the hardest test a system can face. It isn't decided by one server but by a set of decisions made in advance – and at the centre there's almost always a distributed Redis.

Read →
Good practice

A portal that survives peak traffic: 6 good practices for classifieds and news sites

Classifieds and news portals share a similar architecture – and similar weak spots. Here are six things we check first, and how to fix them.

Read →
Databases

Database migrations: why they belong in your CI/CD pipeline

Code ships automatically, but the database is often changed by hand, “quickly, in production”. That's where most nasty surprises come from.

Read →
Basics

What DevOps actually does – one August, as an example

DevOps engineers are the reason a site stays up when everyone arrives at once. Here is what that looks like in practice.

Read →
Audit

Why an audit pays off before the season, not after

You can learn your system's limit in two ways: in advance, calmly – or mid-season, from your customers.

Read →
Security

What a web application firewall is – and who needs one

A web application firewall (WAF) is a guard at the gate: it lets guests in and stops those who come to do damage.

Read →
Reliability

A backup you've never restored isn't a backup

Most companies have backups. Far fewer have ever checked whether they can be restored.

Read →