Page Speed Optimization: Best Practices to Improve Website Performance

Brainpulse Technologies > Blogs > Search Engine Optimization > Page Speed Optimization: Best Practices to Improve Website Performance

Open your website today and count how long it takes to load so that you can read anything written there. Slow sites are usually slow for the same few reasons. The images are too big. There are too many scripts. The server is slow. You can fix these issues with a strategy to get your business website faster without a rebuild from scratch.

This article will help you understand the basics of page speed optimization and let you fix related problems before they kill your website traffic and revenue.

What is a good page speed?

Google uses three scores to measure a website’s speed. They are known as Core Web Vitals. Each one evaluates a different part of the user visit.

1. Loading speed (LCP)

This is called Largest Contentful Paint, or LCP. This is the time the biggest thing on screen takes to show up. That’s usually a main image or headline. You should aim for 2.5 seconds or less for this Core Web Vital element.

2. Response time (INP)

INP is called Interaction to Next Paint. This element measures the gap between a tap or click and the page reacting. This should be 200 milliseconds or less for your website. In 2024, Google replaced First Input Delay with INP.

3. Page stability (CLS)

CLS is called Cumulative Layout Shift. This element evaluates how much things jump around while the page loads. The CLS of your website should be 0.1 or less.

How do you check your speed?

Now you know the three crucial components of the core web vitals. It’s time to understand how your website stands on these parameters. PageSpeed Insights delivers two kinds of results. The top part uses real data from people who visited the site on Chrome. The lower part is a lab test, one simulated visit. It helps find causes, but it can’t give the final verdict.

Search Console offers Core Web Vitals report too. It groups pages that share the same page speed issues. Small sites may not have enough visits to show real data. If so, run the lab test three or four times, because single results may fluctuate.

Before you start fixing, set up the test properly:

  • Test on mobile first, since that’s where most sites score worst.
  • Test the home page apart from inner pages. It usually carries the sliders, banners and tracking tags, so it’s often the heaviest.
  • Write down today’s scores, so you can tell later whether a fix worked.

Why should you fix images first?

As you have the Core Web Vitals score with you, start fixing the heavy image files first. A common mistake is a 4K pixel photo shown in a box 800 pixels wide.

Reduce the file size

Resize each image to the largest size, then compress it. Save photos as WebP or AVIF, which make smaller files than JPEG or PNG at similar quality. Use the srcset attribute so phones get a smaller copy than desktops. In case of logos and icons, use SVG files, which are tiny and stay sharp. Smaller files download faster, and that matters most on slow mobile connections.

Manage Lazy Loading

The loading=”lazy” attribute makes an image wait until the visitor scrolls near it. A lazy-loaded image isn’t requested until the browser has laid out the page, so the most important picture shows up late. Leave lazy loading off the main image and add fetchpriority=”high” to it instead. Make sure the image sits in the HTML itself, not loaded later by CSS or a script. PageSpeed Insights tells you which element is the LCP, so there’s no guessing.

Set a size on every image

Give each image a width and height. The browser then saves the space before the file arrives. That stops the page jumping, which is covered further down.

Is your server slow?

If the images are sorted and the page still drags, look at the server next. A page can’t start loading until its HTML arrives, so a slow server holds up everything. The measure is called time to first byte. If it’s often close to a second or worse, image fixes will only help so far.

Common causes

Two problems turn up again and again:

  • Cheap shared hosting. Many sites squeeze onto one machine and compete for it, so your pages wait their turn.
  • Pages built from scratch on every visit. Many content management systems pull each page from a database every time someone arrives, which takes time.

Ways to fix it

Caching fixes the second cause. The finished page is saved and handed out again instead of being rebuilt. Most WordPress hosts and caching plugins offer it, and hosted shop platforms do it already. Keep the software, theme and plugins up to date as well, because old versions are often slower.

A content delivery network, or CDN, is the next step. It stores copies of your files in many places, so a visitor far from your server gets them from somewhere closer. Also switch on Brotli or gzip compression, which shrinks text files like HTML, CSS and JavaScript.

One catch. Caching hides slow page building, but it doesn’t cure it. If the site is still slow with caching on, look at heavy plugins and slow database queries before paying for a bigger plan. Changing host takes effort, but if response times stay poor on a reasonable setup, it’s often the only fix left.

Which scripts slow down your page?

A fast server and light images can still leave a page that feels sluggish. That’s usually down to scripts. A browser does most of its JavaScript work on one main thread. If that thread is busy, a tap has to wait in line. That wait is what INP measures.

Which scripts cause the delay

The slow scripts are rarely your own code. They tend to be:

  • Chat widgets, which load their own scripts on every page.
  • Tracking pixels, heat maps and A/B tests, which often pile up after years of campaigns.
  • Social buttons and review badges, small on screen but heavy underneath.
  • Video embeds. A YouTube player loads a large amount of JavaScript before anyone presses play, so a plain thumbnail that loads the player on click is lighter.

Each one looks small. Together they can keep the thread busy for seconds. Tag managers make it easy to add more, which is why the pile keeps growing.

How to remove the extra weight?

Start with an audit. Open the PageSpeed Insights report or your browser’s network tab, list every script the page loads, and ask who uses each one. Often nobody does. There may be a pixel from an old ad campaign, or a plugin left over from a redesign. Remove those first. Load the rest with defer or async, or hold them back until the visitor does something. A review widget needed on product pages doesn’t belong on the contact page.

On WordPress and similar platforms, plugins often add CSS and JavaScript to every page, needed or not. Fewer plugins means a lighter site. When testing, tap menus, filters and the basket button on a mid-range Android phone, not a new laptop. Slower phones show problems that a fast laptop hides.

Do fonts and styles matter?

Yes, though less than images and scripts. Once scripts are under control, fonts and stylesheets are the next place to look. Custom fonts are easy to overdo. Each weight and style is its own file. Regular, italic, bold and bold italic make four downloads. Two or three files is enough for most sites. Use the WOFF2 format and host the files on your own domain, which saves a connection to another service. Add font-display: swap so text shows straight away in a backup font, then switches when the real one arrives. You’ll see a small change when it swaps, so pick a backup font with similar letter sizes.

Stylesheets stop the page from showing until they’ve loaded. Big themes and page builders often ship hundreds of kilobytes of CSS that a page never uses. Minify it and remove what’s unused. Be careful with one-click tools that promise to do this for you. Features that build “critical CSS” automatically can break layouts, so look at the result on a phone.

Why does your page jump while loading?

Fonts are one cause of a bigger problem. When things move on screen as a page loads, that’s layout shift. It’s more than annoying. Picture someone about to tap “Buy now” when a banner slides in and pushes the button down. Their thumb lands on something else.

Four causes, four fixes

  • Images without set sizes. Add width and height so the browser holds the space.
  • Ads and embeds that load late. Give each slot a minimum height.
  • Banners added above existing content. Show cookie notices as an overlay at the bottom instead of pushing the page down.
  • Fonts swapping in. Pick a backup font close in size to the real one.

One more habit helps. Don’t add new content above whatever the visitor is already reading.

In what order should you fix things?

You’ve now seen every main fix. The question is where to begin. Start with the fixes that cost least and gain most. A sensible order:

  1. Write down today’s mobile scores for the home page and one inner page.
  2. Fix images: size, format, main image priority and dimensions.
  3. Turn on caching and compression. Check hosting if the server stays slow.
  4. Audit scripts and remove or delay the ones that aren’t worth it.
  5. Tidy fonts and stylesheets.
  6. Fix any layout shifts left over.

This order puts effort against payoff, and for most sites that means images and caching come first. Change one thing at a time and test again. If you change five things at once, you can’t tell which one helped or hurt.

How do you keep it fast?

Once the fixes are in, the work isn’t finished, because speed fades if nobody watches it. A new plugin, popup or tracking tag can undo a month of work. Check Search Console every month and after any big change. Don’t chase a perfect Lighthouse score either. The aim is to pass the three targets for real visitors. A site that scores 78 in a lab test but passes for real users is in better shape than one that scores 100 and still annoys customers.

Conclusion

Page speed isn’t one big project. It’s a short list of simple fixes: lighter images, a faster server, fewer scripts, steadier layouts. Test the site before and after each change, and keep checking as the site grows. When someone wants to add something new to a page, ask what it costs in seconds. If nobody knows, test it before launch.