Dev.to WebDev 🛠 Dev 👁 2 📖 8 min read

I Stopped Treating Website Performance as a Lighthouse Score. Here's What I Focus on Instead.

For a long time, website performance was something many developers discussed in terms of scores. A website gets tested, a Lighthouse report is generated, a score appears, and the development team starts fixing issues un

For a long time, website performance was something many developers discussed in terms of scores.

A website gets tested, a Lighthouse report is generated, a score appears, and the development team starts fixing issues until the number looks better.

But real-world website performance is much more complicated than that.

A website can have a good performance score and still feel frustrating to use. It can load quickly on a desktop but struggle on mobile. It can have compressed images but still suffer from excessive JavaScript, inefficient database queries or slow API responses.

After working on website development and performance optimisation across different projects, I've learned that performance should not be treated as a final checklist before launch.

It should be part of the development process from the beginning.

Here are the areas I pay attention to when building and optimising websites.

1. Images Can Make or Break Website Performance

One of the first things I investigate when a website feels slow is its images.

Large images are a common problem, especially on websites that display product photographs, portfolio galleries, banners and other visual content.

Uploading a high-resolution image directly from a camera or design tool without optimisation can unnecessarily increase page weight.

Some practical improvements include:

  • Compressing images before uploading them.
  • Using modern image formats such as WebP where appropriate.
  • Serving images at dimensions suitable for their display size.
  • Implementing lazy loading for images that are outside the initial viewport.
  • Avoiding unnecessary large background images.
  • Providing appropriate image dimensions to reduce layout shifts.

Lazy loading is particularly useful for long pages containing multiple images. Instead of loading every image immediately, the browser can load suitable images as visitors approach them.

However, not every image should be lazy-loaded. Important above-the-fold images, especially the main Largest Contentful Paint (LCP) element, should be prioritised rather than delayed.

The goal isn't simply to make images smaller. It's to deliver the right image, at the right size, at the right time.

2. JavaScript Should Be Used Carefully

JavaScript makes modern websites interactive, but excessive JavaScript can affect loading performance and responsiveness.

I've encountered situations where unnecessary scripts and large JavaScript bundles add work for the browser.

Some useful optimisation techniques include:

  • Removing unused JavaScript.
  • Minifying production JavaScript.
  • Splitting code where appropriate.
  • Loading non-critical scripts only when needed.
  • Avoiding unnecessary third-party libraries.
  • Reducing expensive client-side rendering.
  • Keeping interactive components as lightweight as possible.

Developers using modern frameworks such as Next.js should pay attention to the JavaScript sent to the browser.

For example, not every component needs to run on the client. Keeping suitable components server-rendered can reduce the amount of JavaScript required for client-side execution.

The important lesson is simple: adding another library or script should have a clear purpose.

3. Caching Helps Reduce Repeated Work

Caching is another important part of performance optimisation.

Without an appropriate caching strategy, a website may repeatedly perform work that could have been avoided.

Depending on the application, caching can be applied to:

  • Static assets.
  • API responses.
  • Database query results.
  • Frequently accessed content.
  • Server-rendered pages or generated content.

Browser caching can also help returning visitors avoid downloading unchanged assets repeatedly.

However, caching should be implemented carefully. Dynamic information, user-specific content and frequently updated data need appropriate cache rules.

A good caching strategy balances performance with data accuracy.

4. Don't Ignore Database Queries and API Responses

Frontend optimisation is only one part of website performance.

A visually lightweight website can still feel slow if its backend takes too long to respond.

Database queries and API requests can become bottlenecks, particularly when an application handles product catalogues, user accounts, dashboards or complex data.

When investigating backend performance, I pay attention to:

  • Queries that retrieve unnecessary data.
  • Repeated database requests.
  • Missing or inefficient database indexes.
  • Unnecessary API calls.
  • Large API responses.
  • Slow operations that block the response.
  • Queries that could be simplified or optimised.

For example, a page displaying a list of products should not retrieve every available field if it only needs a product name, image and price.

Reducing unnecessary database work can improve response times and make an application more efficient.

This is why performance optimisation should involve both frontend and backend developers.

5. Mobile Performance Deserves Serious Attention

A website that performs well on a desktop isn't necessarily going to perform equally well on a mobile device.

Mobile users may have slower network connections, less powerful devices and smaller screens.

That makes mobile testing essential.

Some areas I recommend checking include:

  • Image sizes and loading behaviour.
  • JavaScript execution.
  • Navigation and menu responsiveness.
  • Button and interaction responsiveness.
  • Layout stability.
  • Font loading.
  • Page content visibility.
  • Unnecessary animations and effects.

Mobile-first development isn't just about making a desktop layout fit a smaller screen.

It means thinking about the experience of mobile visitors when making design and development decisions.

A good mobile experience should be fast, accessible and easy to navigate.

6. Website Performance and Technical SEO Are Connected

This is one area I believe developers should never overlook.

A website isn't SEO-friendly simply because it has a title tag and meta description.

Its underlying code, rendering approach, content structure and technical implementation also matter.

When developing a website, I pay attention to several SEO-related elements:

Semantic HTML: Use appropriate HTML elements such as headings, paragraphs, navigation, main content and links. This helps create a meaningful document structure.

Heading hierarchy: Organise headings logically instead of choosing heading tags only for their visual appearance.

Metadata: Provide relevant page titles, meta descriptions and canonical URLs where appropriate.

Internal linking: Make important pages accessible through meaningful internal links.

Image optimisation: Use descriptive alternative text where images convey meaningful information, and optimise image delivery.

Indexability: Make sure important pages can be crawled and indexed, and avoid accidentally blocking content that should appear in search results.

Structured data: Implement relevant schema markup where it accurately represents the page content.

Mobile usability: Ensure that important content and functionality are available on mobile devices.

Rendering: Make sure search engines can access the important content of the website, especially when using JavaScript-heavy frameworks.

Technical SEO should not be postponed until after a website is launched. Many problems are easier to prevent during development than to repair later.

7. Never Ignore Performance Warnings

Tools such as Lighthouse and PageSpeed Insights can identify problems that developers might otherwise overlook.

However, I don't believe developers should blindly chase a perfect score.

I also don't believe they should ignore warnings simply because the website appears to load normally.

Every warning deserves investigation.

For example:

  • An image without proper dimensions may contribute to layout shifts.
  • Render-blocking resources may delay initial rendering.
  • Unused JavaScript may increase unnecessary browser work.
  • Long main-thread tasks may affect responsiveness.
  • Improper caching may cause assets to be downloaded repeatedly.

Not every warning has the same impact, and some recommendations may not be applicable to every website.

The important thing is to understand the underlying problem, evaluate its impact and decide whether a change is appropriate.

A performance report should guide engineering decisions, not become a number developers blindly optimise.

8. The Tools I Use to Evaluate Website Performance

I use several tools to investigate performance issues and understand how a website behaves.

Google PageSpeed Insights

PageSpeed Insights provides performance assessments for mobile and desktop, along with recommendations for improving the page.

It also provides field data from the Chrome User Experience Report when sufficient data is available.

This is useful for understanding both lab-based performance and real-user experience.

Lighthouse

Lighthouse helps developers audit performance, accessibility, SEO and other aspects of website quality.

I find it useful during development because it helps identify potential issues before a website reaches production.

GTmetrix

GTmetrix provides detailed performance reports and helps investigate loading behaviour, page size and resource-related bottlenecks.

It can be useful when comparing how changes affect page loading.

Core Web Vitals

Core Web Vitals focus on important aspects of the user experience:

  • Largest Contentful Paint (LCP): Measures loading performance.
  • Interaction to Next Paint (INP): Measures responsiveness.
  • Cumulative Layout Shift (CLS): Measures visual stability.

The current recommended thresholds for good Core Web Vitals are:

Metric Good threshold
LCP 2.5 seconds or less
INP 200 milliseconds or less
CLS 0.1 or less

These metrics are particularly useful because they focus on the experience visitors actually have, rather than just how a page performs in one laboratory test.

It's important to remember that field data and laboratory data serve different purposes. Both are useful, but they should not be interpreted as interchangeable measurements.

9. My Website Development Checklist

If I were advising developers who build websites for clients, these are the principles I'd recommend following:

  1. Start with clean, SEO-friendly code. Think about structure, accessibility and crawlability from the beginning.
  2. Optimise images early. Use suitable formats, compression and responsive image delivery.
  3. Keep JavaScript under control. Avoid unnecessary dependencies and reduce the amount of code sent to the browser.
  4. Build mobile-first experiences. Test the actual experience on mobile devices, not just desktop previews.
  5. Optimise backend operations. Review API responses, database queries and caching.
  6. Pay attention to Core Web Vitals. Focus on loading, responsiveness and visual stability.
  7. Investigate warnings. Understand performance recommendations instead of ignoring them.
  8. Test throughout development. Don't wait until the final deployment to discover major problems.
  9. Monitor after launch. Performance can change as content, scripts and application features grow.

These practices are not limited to a particular framework or programming language. They apply to almost every type of website.

Final Thoughts

I've come to realise that website performance isn't about achieving a particular Lighthouse score.

It's about building websites that load efficiently, respond smoothly, display content correctly and make it easy for visitors to find what they need.

Images matter. JavaScript matters. Database queries matter. API responses matter. Mobile experience matters. And the underlying code matters just as much.

Most importantly, performance and SEO should not be treated as separate responsibilities.

A website should be designed and developed with both in mind.

For businesses looking to build or improve their online presence, having the right development approach from the beginning can make a meaningful difference. At SmarterDigi, we work on website development and digital solutions with attention to usability, performance and search visibility.

A fast website is valuable. A well-structured, useful and search-friendly website that performs well is even better.

Build for users first, measure performance carefully, and never stop improving.

📰 Read the original article on Dev.to WebDev

Originally published by Dev.to WebDev. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.