
This site started at 93/100 on mobile Lighthouse, with LCP at 2.2 s and the main thread blocked for 260 ms. Today the score reaches 99, with LCP down under two seconds. Here is the journey, with the real numbers behind every decision.
Before touching any lines of code I established strict testing conditions: Lighthouse running in mobile emulation, with CPU throttled 4× and a simulated high-latency network profile. This setup looks unforgiving, but it mirrors real-world visits on mid-tier smartphones across trains, rural areas, or weak cellular reception. When a website remains fluid and legible under those conditions, it feels instantaneous on any modern device.
The initial diagnosis: pinpointing wasted milliseconds
The initial audit highlighted three critical bottlenecks holding back our Core Web Vitals: a Largest Contentful Paint (LCP) of 2.2 seconds, Total Blocking Time (TBT) sitting at 260 ms, and First Contentful Paint (FCP) taking 1.6 seconds. Looking into Chrome DevTools Performance profiles revealed that the main thread was occupied by secondary scripts while the initial layout was stalled waiting for external assets to finish resolving.
The primary culprit: font preloading overhead
I had initially placed a preload tag for the Inter font directly inside the document head. In theory this was intended to ensure clean typography early; in reality, over slower mobile connections it competed for critical bandwidth against our stylesheet and forced the browser into a double layout pass the moment the final font swapped in. By removing font preloading and letting the initial paint occur with system fallback fonts, first paint dropped from 2.4 seconds to 1.2 seconds with no noticeable layout disruption.
Typeface subsetting: slimming fonts down to essentials
The full font distribution contained thousands of glyphs supporting alphabets and regional character sets that this project will never use. I engineered an automated subsetting routine that extracts only the exact characters present in published texts, coupled with a generous safety margin for punctuation and accented letters. The resulting published WOFF2 binary shrank from over 47 KB down to under 29 KB, eliminating 40% of font payload across the critical rendering path.
Deferred interactions and idle execution schedules
The self-typing hero effect and visual entry transitions were previously booting shortly after window load, consuming precious processor cycles during the critical window where layout is determined. I rearranged these tasks: animations now listen for genuine user intent (a tap or scroll) or execute via requestIdleCallback after a safe eight-second delay. Main thread blocking plummeted from over 400 ms to roughly 100 ms.
Dead code elimination and inline critical styles
Over iterative design passes, stylesheets accumulate orphaned rules that no longer bind to any live DOM nodes. I audited every rule in style.css against our actual pages, stripping over 15 KB of obsolete CSS. Furthermore, during our build pipeline, critical styles required for above-the-fold rendering are inlined straight into HTML, allowing secondary rules to load asynchronously without blocking the initial display.
Next-gen responsive picture formats with srcset
All portfolio and article imagery was converted into modern WebP and AVIF formats. For every graphic asset, three dedicated widths are generated (480, 960, and 1440 pixels), enabling the browser to fetch only the resolution demanded by screen density via semantic picture tags. The primary above-the-fold hero graphic uses fetchpriority high, while all other imagery is loaded lazily with explicit dimensions to eradicate layout shift.
Streamlined service worker and targeted cache policy
Our Service Worker was re-engineered to strictly limit precache storage to core application architecture (the HTML shell, minified stylesheet, reduced font, and vital SVG icons). Individual blog entries and ancillary pages are cached dynamically only when requested by the reader, ensuring zero unnecessary data usage for single-page readers.
Results compared before and after
- Largest Contentful Paint (LCP) reliably down from 2.2 s to 1.8 s on simulated 4G
- Total Blocking Time (TBT) compressed from 260 ms to around 100 ms
- First Contentful Paint (FCP) achieved at 1.2 s for an instant visual response
- Cumulative Layout Shift (CLS) recorded at 0.01 for rock-solid visual stability
- Mobile Lighthouse score advanced to 99/100, with SEO, Accessibility, and Best Practices at 100
The deeper lesson behind web speed
Benchmark scores are never the ultimate objective of software engineering; they serve as an objective barometer of the respect we show to our visitors' time, attention, and mobile battery. Every millisecond shaved off loading times removes friction and encourages meaningful engagement. The philosophy remains constant: measure real data, trim the excess, and verify every step under realistic conditions.