All articles

Web development · Sep 20, 2026 · 3 min read

How to make your website load in under two seconds

Every extra second of loading costs visitors and sales. These practical steps make a real difference to website speed.

Why speed matters so much

People are impatient online. Studies from Google show that as page load time goes from one second to three seconds, the chance of a visitor leaving increases by around a third. On mobile networks the effect is even stronger.

Speed also affects how easily people find you. Google uses Core Web Vitals as a ranking signal, so a slow website can lose visitors from search results before anyone even sees it. A fast website wins twice: more people arrive and more of them stay.

Understand Core Web Vitals

Core Web Vitals are three simple measurements that describe how a page feels to real users. They are the best place to start because they focus on experience rather than technical trivia.

  • Largest Contentful Paint (LCP): how quickly the main content appears. Aim for under 2.5 seconds.
  • Interaction to Next Paint (INP): how quickly the page responds when someone taps or clicks. Aim for under 200 milliseconds.
  • Cumulative Layout Shift (CLS): how much the page jumps around while loading. Aim for a score under 0.1.

Optimise your images

Images are usually the heaviest part of a web page. A single photo straight from a camera can be larger than the rest of the website combined. Serve modern formats like WebP or AVIF, which are often half the size of JPEG at the same quality.

Resize images to the size they are actually shown. There is no reason to send a 4000 pixel wide photo to a phone screen. Lazy load images that sit below the first screen so the browser only downloads them when they are needed. Frameworks like Next.js handle much of this automatically with their built in image component.

Send less JavaScript

JavaScript is expensive. The browser has to download it, read it and run it before the page becomes interactive. On an average phone this can take several seconds for a large bundle.

Remove libraries you no longer use, split code so each page only loads what it needs and render as much as possible on the server. Be careful with third party scripts such as chat widgets, trackers and ad tools. Each one adds weight and can quietly slow down every page.

Use caching and a CDN

A content delivery network stores copies of your website on servers around the world. When someone in Dhaka visits a site hosted in the United States, the files come from a nearby location instead of crossing the ocean every time.

Combine a CDN with good cache headers so browsers keep static files like images, fonts and stylesheets. Repeat visits can then feel almost instant because most of the page is already on the visitor's device.

Load fonts wisely

Custom fonts make a brand feel unique, but each font file adds download time. Use only the weights you need, host fonts on your own domain when possible and use font display swap so text appears immediately with a fallback font.

Measure, improve and measure again

Guessing about performance rarely works. Use PageSpeed Insights, Lighthouse and the Core Web Vitals report in Google Search Console to see what real users experience. Fix the biggest problem first, then measure again.

Speed is not a one time project. New features, images and scripts can slowly make a site heavier. Set a performance budget and check it before every release so your website stays fast as it grows.

More from the blog

Have a challenge in mind?

Let's talk about what you're building.

Start a conversation