Easiest Ways to Improve Website Performance

Emre Sarac
4 min readFeb 2, 2022

In today’s digital world, companies focus on adding new features because millions of websites are used for different purposes every day.

Unfortunately, most of these websites are not user friendly.

Users experience dealing with many problems such as poorly optimized performance, slow loading times, etc.

Therefore, a website that takes more time to show to users will tend to lose visitors due to SEO and Core Web Vitals, resulting in a low bounce rate on google.

These problems cause not only short-term but also long-term problems.

How can we solve it?

1- Image Optimization.

Large images will slow down your page loading. This means a huge loss of performance and speed.

Now let’s see how to solve it.

1.1-) We should use images in the correct format.

PNG is the best choice for designs that require the use of transparency, such as logos, images with text, etc. But the biggest downside is that they are larger in size and slow down your website.

JPG is smaller and faster to load, but comes with a loss of quality

source: https://www.fixrunner.com/png-vs-jpg-which-is-better-for-your-website/

1.2-) We need to compress our images.

If we compress our images, we can achieve a size reduction of up to 70%.

Compress and without compress

1.3-) We should upload our pictures to CDN.

You can use server networks to reduce the loading times of your visitors.

When your site is on a server, every visitor sends a request to the same server.

This means that when your site is experiencing high levels of traffic, the time it takes to process each request increases and the load times for all of them slow down.

A CDN can help you eliminate these problems.

1.4-) We should use the right size image.

We should not use a 1920x1080 resolution image for mobile. Instead, we should prefer a lower resolution image.

1.5-) We can convert our images to webp format.

As Google said:

WebP is an image file format that Google has developed as a replacement for JPEG, PNG, and GIF file formats. WebP yields files that are smaller for the same quality, or of higher quality for the same size. It supports both lossy and lossless compression, as well as animation and alpha transparency.

PNG vs webp

1.6-) Lazy Load

Lazy load only loads images when they are visible in the user’s browser.

source: https://web.dev/browser-level-image-lazy-loading/
<img src="image.jpg" alt="..." loading="lazy">

Images in invisible places on your page will not load when your page is opened. This will increase your page loading speed.

2- Minify Css

CSS’s are extremely important files as they determine the appearance of your site.

You can reduce these sizes by “minify” your files. But sometimes they create complex code that can slow down your site significantly.

Minifying a file involves removing unnecessary formatting, spaces.

It’s important that you eliminate extra spaces, line breaks, and indentations, as every unnecessary piece of code increases the size of your page. This ensures that your pages are as lean as possible.

Minified css example.

3-Defer JavaScript loading

Deferring a Javascript file means preventing it from loading until after other elements have loaded.

If you defer larger files, like JavaScript, you ensure that the rest of your content can load without a delay.

source: https://developers.google.com/web/fundamentals/performance/optimizing-content-efficiency/loading-third-party-javascript
<script src="example.js" defer></script>

I tried to explain my first English article in its simplest form.
I will continue to explain in details later. Waiting for your feedback. :)

--

--