13
13 Comments

Speed up your landing page within 2 hours

If you can’t measure it, you can’t improve it

The first thing you should do with your existing landing page is just run a Google speed test on it. You might not understand everything that comes, but you will get a fair bit of idea of what’s blocking your landing page’s performance on both desktop and mobile. If you’re confident in your technical ability, read up the individual issues and keep improving your landing page till you hit at least a 90 score. Otherwise, ask a developer friend and he’ll help you out.


Some simple things you can do to speed up your landing pages within 2 hours:

  1. Compress & Optimize your Assets

(Difficulty: Easy, Expected Time: 30 minutes)

This is probably the number one reason why sites load slow. Google speed test will point out the heavier assets, but it does not hurt to go through each one you have manually. A few things to keep in mind when optimizing images are:

  • First, check the size of the image. You definitely do not want images crossing the 500kB mark, though ideal sizes are less than 100kB
  • Next check the image dimensions. Many times, we are using 2048 x 2048 images when 512 x 512 would be good enough. Just reducing the image to optimal dimensions can get anywhere from 4 to 32 times reduction in image size.
  • Finally check the image extension. JPG images are usually smaller than PNG images so you can try converting PNG images to JPG and see if that works for you. JPG images do not have an alpha channel, so if you have a transparent background, you have to use PNG
  1. Minify HTML, CSS & Javascript

(Difficulty: Medium, Expected Time: 30 minutes)

If you’re using something like WordPress to create your landing page, you have plugins like Autoptimize (https://wordpress.org/plugins/autoptimize/) which do this for you. But, if you are doing it via code and not using a bundler like Webpack, there are chances you might miss this one.

  1. Use asynchronous loading

(Difficulty: Easy, Expected Time: 5 minutes)

Scripts like CSS and JavaScript can be loaded in two different ways: Synchronously or Asynchronously. If your scripts load synchronously, they load one at a time, in the order, they appear on the page. If your scripts load asynchronously, on the other hand, some of them will load simultaneously. This can be done by just adding the ‘async’ keyword while calling the script.

  1. Use Deferred Loading for Javascript files

(Difficulty: Easy, Expected Time: 5 minutes)

Deferring a 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. Just use the ‘defer’ keyword for any script that’s not super-important to load on page load and can instead be loaded at a later stage. For example, if you have some javascript animations or are using some javascript libraries, these can be loaded once your page has loaded and should be deferred.

  1. Consider using a CDN

(Difficulty: Hard, Expected Time: 45 minutes)

This one’s not as simple if you have not used a Content Delivery Network (CDN) before. However, this can work wonders if your landing page audience is from different geographical locations or you expect a large number of people to visit your landing page at the same time. The way data transfer works is that people closest to the physical location of the server get served the fastest. Having a CDN can help your users get faster load times, even in times of heavy traffic. Even if you are new to CDN, you can get started with MaxCDN and Cloudflare, and it should not take more than 30 minutes to set things up.


The above will likely get you to a great start but if you’re still getting stuck, reach out to me and I’d love to be of help.

on February 8, 2022
  1. 3

    For minimizing the js bundle size, I used webpack-bundle-analyzer and i quite helped me a lot

    1. 2

      webpack-bundle-analyzer is a really great tool for those comfortable with CLI. Thank you for pointing this out :)

  2. 2

    Squoosh.app is great for reducing img size. Easy and online. Better than using WP’s tool for it!

    1. 2

      If you're including UGC you can actually dynamically resize images using an Image CDN. We use BunnyCDN and actually do that to improve page loads.

      1. 1

        Saw Bunny CDN's Optimizer, looks really powerful. Will be trying it out soon.

      2. 1

        I’ll check that out! Can’t really trust optimizing images to users 😀

    2. 2

      Just checked squoosh.app. The site looks pretty great and offers compression in all formats. Thanks for pointing it out, will definitely be using it going ahead

  3. 1

    Nice post! Short and specific. Thanks!

  4. 1

    Unless you're doing something very wrong, do you really need to spend 2 hours to speed up your landing page?

    Shouldn't you instead use that 2 hours to actively promote your product?
    In that 2 hours:

    • How many leads can you find?
    • How many tweets/dm/contacts/posts can you do about your business/product/solution?

    How about you take that 2 hours to write another landing page targetting a different market segment?

    1. 1

      If your landing page already scores 90 or above in the Google Speed Test, you do not need to do this. However, a one-second delay in page load time yields:

      • 11% fewer page views
      • 16% decrease in customer satisfaction
      • 7% loss in conversions

      74 percent of users accessing the mobile site would leave if it takes longer than 5 seconds to load.

      Kinsta's page speed guide is an excellent resource to understand why page speed does matter.

      1. 1

        I'd take what Kinsta is saying with a grain of salt. They are in the business os selling hosting.

        Of course they are going to tell you that speed matters, that's their main selling point.

        You don't have the traffic volume of Walmart or the Obama campaign.

        We don't know what they did to improve speed. Did they also redo the copy/layout of their home page while speeding them.

        Blindly optimizing for speed when you could be selling is comforting. But not useful in most cases. Unless your page is really slow and you have stats to show for it, don't bother.

        Look at your bounce rate, conversion rate and time spent on page stats before optimizing blindly.

        Also, if you don't have at least few hundred visits, drive traffic to your page before you begin to optimize. Otherwise, your stats might not be accurate.

        1. 1

          @martdi Totally agree with you on this. We should first measure then optimize the bottlenecks. Blindly optimizing may lead to more disaster than helping you.

          The premise of this post is:

          Every second counts. Loading time is a major contributing factor to page abandonment. The average user has no patience for a page that takes too long to load, and justifiably so. Slower page response time results in an increase in page abandonment.

          So if you are at the stage where optimization is needed the post can guide you for the steps that you can take.

          You and I are actually saying the same thing. You need to measure your stats before taking action.

Trending on Indie Hackers
I spent $0 on marketing and got 1,200 website visitors - Here's my exact playbook User Avatar 58 comments Veo 3.1 vs Sora 2: AI Video Generation in 2025 🎬🤖 User Avatar 29 comments Codenhack Beta — Full Access + Referral User Avatar 21 comments I built eSIMKitStore — helping travelers stay online with instant QR-based eSIMs 🌍 User Avatar 20 comments 🚀 Get Your Brand Featured on FaceSeek User Avatar 18 comments Day 6 - Slow days as a solo founder User Avatar 16 comments