Website Speed Optimisation Is a Monthly Habit, Not a One-Off Fix
In this article
A website that was fast on launch day does not stay fast by itself. The code does not wear out, but everything around it moves. The content grows, staff upload photos straight from a phone, marketing adds a pixel or a chat widget, the database fills up, the software underneath gets patched, and Google tightens what it counts as good. Each change is small. Added together over a year they are the difference between a page that loads in a second and one that takes four.
So speed optimisation is not a project you finish. It is a short list of checks run every month, with the numbers written down so drift is visible before customers notice it. The list below is the one we run on the sites we maintain, and it takes an hour or two a month for a typical business site.
If you only do one thing, check your site's field data in Google Search Console once a month. That report shows what real visitors experienced over the last 28 days, and it is the first place a slow month shows up.
Why a fast site slows down
None of these happen on launch day. All of them happen within a year.
The image library grows
The site launches with twenty carefully compressed photos. Twelve months later it has four hundred, uploaded by whoever was nearest, many of them 4,000 pixels wide and several megabytes each. A product page that loaded in under a second now pulls 12 MB of photos on a phone. This is the most common reason a site we are asked to look at has got slower, and it has nothing to do with the code.
Scripts accumulate
A Meta pixel for one campaign, a LinkedIn tag for another, a chat widget somebody trialled, a heat-map recorder, a cookie banner, a second analytics tool because the first one was confusing. Each is a separate download from a separate server, and most of them run JavaScript on the browser's main thread before the visitor can tap anything. Nobody removes them when the campaign ends.
The database grows
A query that scans a table of 500 rows is instant. The same query over 500,000 rows without an index takes a noticeable fraction of a second, and a page that runs it ten times is now slow. Tables that grow quietly include orders, enquiries, log entries and, in Django, the sessions table. The sessions table gains a row for every visitor who gets a session cookie and never loses one unless something clears it.
The software underneath moves
Django, Python, the database and every library get security releases. Skipping them is a security problem first, but it is also a speed problem. The Python 3.11 release notes report it as between 10% and 60% faster than 3.10 depending on the workload, and later releases keep improving. A site left on an old runtime never collects that improvement.
Google changes the measure
Google's Core Web Vitals are the speed numbers that feed its page experience signal, and they change. Interaction to Next Paint replaced First Input Delay in March 2024. A site that passed the old responsiveness metric could fail the new one without a single line of code changing. If nobody is watching the report, the first sign is a drop in rankings. Rankings are not the only cost: a fast, stable site converts more visitors, so the enquiry count drifts with the speed.
The checks we run every month
- Field data first. Open the Core Web Vitals report in Search Console and the field section of PageSpeed Insights for the home page and the two or three pages that earn the most. These are measured from real Chrome visitors over the trailing 28 days, so a change made in July shows fully by the end of August. The thresholds, from Google's documentation, are an LCP of 2.5 seconds or under, an INP of 200 milliseconds or under and a CLS of 0.1 or under, judged at the 75th percentile of visits. We explain how to read those reports in our guide to Core Web Vitals thresholds and reports.
- Lab run on the same pages. Run Lighthouse, through PageSpeed Insights or Chrome DevTools, on the same pages and note the score, the total page weight and the largest image. The lab score is a repeatable test, so it is the better number for spotting month-on-month drift.
- Heaviest pages. Sort the site's pages by total transfer size. Any page over a couple of megabytes gets a look at what it is loading and why. It is almost always images.
- Third-party scripts. List every external script the home page loads; the Network panel in DevTools, filtered to third-party requests, shows them. Each one needs a named owner and a reason. Anything without both is removed.
- Slowest views. Check the server's request timing for the five slowest URLs. In Django we use Django Debug Toolbar on staging to count queries per page. A page that has gone from 8 queries to 80 since launch has an N+1 problem that select_related or prefetch_related fixes.
- Database housekeeping. Clear expired sessions and check that PostgreSQL's autovacuum is keeping up. Look for any query the database now answers with a scan of the whole table where it used to use an index.
- Patches on staging. Apply Django, Python and dependency updates on the staging copy, click through the main journeys, then release.
- Error and uptime logs. A spike in 500 errors or a run of slow responses in the uptime monitor usually points to one of the problems above before it shows in Google's data.
Database housekeeping in Django and PostgreSQL
Three jobs cover most of it. Django ships a management command that deletes expired rows from the sessions table; we run it from a nightly cron job rather than by hand:
python manage.py clearsessions
PostgreSQL does not overwrite a row when it is updated or deleted. It marks the old version dead and leaves it there until a vacuum reclaims the space. Autovacuum does this for you, but on a table that churns heavily it can fall behind, and dead rows make every scan slower. A monthly look at the dead row count is enough to catch it:
SELECT relname, n_live_tup, n_dead_tup, last_autovacuum
FROM pg_stat_user_tables
ORDER BY n_dead_tup DESC
LIMIT 10;
Third, enable the pg_stat_statements extension so the database keeps a running table of the queries that cost the most time in total. The top of that list is where an index is missing. A query that was fine when the table was small gets slower as the table grows; the index turns a scan of every row into a direct lookup. Slow queries reach visitors as a slow first byte, and our post on server response time and TTFB covers how to measure that from the outside.
Keeping the image library under control
The fix for image growth is to take the decision away from the person uploading. In our Django builds the admin resizes every upload on save with Pillow and generates the sizes the templates actually use. It stores a WebP or AVIF copy next to the original so the template can serve the smaller file to browsers that support it. The 6 MB phone photo never reaches a visitor. Which of the two to store is covered in our AVIF vs JPEG XL comparison.
If your site does not do that, a monthly audit is the fallback: sort the media folder by size, re-compress anything over a few hundred kilobytes, and convert it. Which format to pick depends on the picture. Our comparison of WebP, AVIF and JPEG XL goes through the trade-offs. The free image format tester shows the file size of your own photo in each format, so you can see the saving before changing anything.
A budget for marketing scripts
Scripts are harder than images because every one of them has someone who wanted it. The rule that works is a budget: the site loads a fixed number of third-party scripts, and adding one means removing one or making the case for a bigger budget. Alongside that:
- Every tag has an owner and a review date written down. If nobody has looked at the data it collects in three months, it goes.
- Nothing fires before the page is usable. In Google Tag Manager that means triggering on Window Loaded rather than Page View, so the pixel downloads after the content, not before it.
- Consent gates everything that is not strictly necessary, which in the UK is most of it. A script that is not allowed to run should not be downloaded either.
- Chat widgets and video embeds load on demand: a plain button or a thumbnail first, the real widget only when it is clicked.
Write the numbers down
Drift is only visible against last month. A plain spreadsheet with one row per month is enough: the three Core Web Vitals from field data, the Lighthouse score, total page weight and the number of third-party requests. Track these for the home page and the two or three pages that bring in business. The website health check gives a quick snapshot of speed, SEO and security checks if you want a starting point for the first row.
| Check | Where to look | Act when |
|---|---|---|
| LCP, INP and CLS (field) | Search Console, PageSpeed Insights | Any metric leaves the good range |
| Lighthouse score (lab) | PageSpeed Insights | It drops by more than a few points |
| Page weight | DevTools Network panel | It grows without a new feature to explain it |
| Third-party requests | DevTools Network panel | Any script has no owner |
| Queries per page | Django Debug Toolbar on staging | The count rises for the same page |
| Dead rows and slow queries | pg_stat_user_tables, pg_stat_statements | A table or query climbs the list |
How we handle this on our own builds
Speed checks are part of our maintenance plan for sites we built, alongside hosting and daily backups that are restored for real to prove they work. It also includes Django and dependency patches tested on staging first, and uptime and error alerts around the clock. Each month the client gets a plain-English note that says what was checked, what changed and what we did about it.
We apply the same habit to our own site. In September 2026 we audited it against 16 months of Search Console data. We redirected 46 duplicate or weak posts to their strongest page and rewrote the titles of the 31 posts we kept. Thin pages waste crawl time in the same way heavy images waste load time. The point of a monthly habit is that none of these jobs is ever big. A site checked every month needs small fixes; a site checked once every three years needs a rebuild. Our post on why website maintenance matters covers the security and backup side of the same routine.