Web Development

Website Performance Optimization: Speed Work That Users Notice

Published September 4, 2026 Scriplit

Website performance work is useful when a visitor can tell the difference: the main content appears quickly, taps feel immediate, and the layout does not jump while they try to tap a button. Google’s Core Web Vitals — Largest Contentful Paint (LCP), Interaction to Next Paint (INP), and Cumulative Layout Shift (CLS) — are a practical way to talk about those three experiences. They are not a branding exercise. They are a debug order.

Measure on the devices you actually have

Lab scores on a developer laptop lie in a friendly way. Use field data if Search Console or CrUX shows it, and use a mid-range phone on throttled network for lab checks. Pick the templates that matter: home, a typical service or product page, and the page with the form or checkout. Optimizing a rarely visited blog layout will not change how the business feels.

Record a baseline before you change anything: LCP element (often a hero image or a large heading), INP trouble spots (menus, filters, sliders), and CLS culprits (late fonts, ads, embeds). Then change one class of problem at a time so you know what helped.

LCP: make the main thing arrive first

LCP is usually an image, a poster frame, or a block of text. If it is a hero image, serve a correctly sized file in a modern format, set width and height (or aspect-ratio) so the browser can reserve space, and preload only that one image if it is truly the LCP. Do not preload every asset “for speed.” Preload is a queue jumper; abuse it and you delay the thing you meant to help.

Server time counts. A PHP page that waits on a slow database query or a remote API before HTML starts will have a poor LCP no matter how compressed the JPEG is. Cache HTML for anonymous visitors when the page is mostly public. Defer work that is not needed to paint: analytics, A/B tools, chat.

  • Compress and size images to the largest they will display; do not ship a 3x retina file to a 360-pixel screen as the only source.
  • Use srcset and sizes so the browser can pick a variant.
  • Avoid putting the LCP image inside a slider that initializes in JavaScript.
  • Inline a tiny bit of critical CSS if the first paint is blocked on a huge stylesheet; do not inline everything.
  • Watch for cookie banners and popovers that become the LCP by accident.

INP: respect the main thread

INP measures how long the page takes to respond to clicks, taps, and keypresses. Heavy third-party scripts, large client-side frameworks on a brochure page, and input handlers that do too much work are the usual villains. A mobile menu that takes half a second to open is an INP problem even if LCP looks fine.

Fix INP by doing less on first load. Split JavaScript so the home page does not download the checkout app. Debounce search-as-you-type. Replace auto-playing carousels with static stacks. If a library is only used after a click, load it on that click. Long tasks in the main thread show up in performance traces; you do not need to guess.

Third-party scripts: name them or remove them

Tag managers, live chat, heatmaps, review widgets, and embedded maps compete with your own code. Each one can delay INP and LCP. Make a list of every script, who asked for it, and what decision it supports. If nobody can name the decision, it goes. Load chat after idle or after a user gesture. Replace a full Google Map embed on every page with a static image and a link, then load the map on the contact page only.

Consent tools are necessary in many jurisdictions; they still cost performance. Load them efficiently and do not stack three overlapping banners from three vendors.

CLS: stop the page from jumping

CLS is visual instability. Images without dimensions, ads that inject late, webfonts that swap late and change metrics, and embeds that expand after load are classic causes. Reserve space. Prefer font-display: optional or a matching fallback metric if branding allows. Do not inject a toolbar above the header after paint. If you must show a cookie banner, reserve a region or overlay without pushing the LCP down after it appears.

Symptom Likely cause First fix to try
Hero pops in late Huge image or image discovered late in CSS Proper img in HTML, sized, possibly preloaded
Tap on “Contact” feels dead Main thread busy with tags or a bundle Defer third parties; split JS
Button moves as fonts load Font swap with different metrics Fallback font metrics or preload the one heading font
Layout jumps when chat loads Widget injects a launcher into the document flow Fixed-position launcher; load later
Product grid shuffles Images without aspect ratio Width/height or CSS aspect-ratio on thumbnails

Images as a system, not a one-off export

Give editors a rule: maximum pixel width for heroes, for inline photos, and for thumbnails. Automatic compression on upload is worth more than a yearly “optimize the site” project. Lazy-load below-the-fold images; do not lazy-load the LCP image. SVGs for simple icons beat PNG sprites that include unused artwork. Background images in CSS are harder to prioritize than content images in HTML — prefer content images for anything that might be LCP.

After speed, check whether the faster page still converts

A page that paints quickly but hides the phone number in an animated drawer has optimized the wrong thing. Performance work should sit next to website conversion optimization: the primary action must remain visible while you remove decoration. If a marketing experiment requires a heavy script, run it on a landing page, not on every URL.

Scriplit treats Core Web Vitals as part of web development services, not as a separate slogan. If you want a practical pass on a live site, send the URL and which template is the money page via the web development contact form, and mention whether you can change hosting or only the front-end.