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:
(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:
(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.
(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.
(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.
(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.
For minimizing the js bundle size, I used webpack-bundle-analyzer and i quite helped me a lot
webpack-bundle-analyzer is a really great tool for those comfortable with CLI. Thank you for pointing this out :)
Squoosh.app is great for reducing img size. Easy and online. Better than using WP’s tool for it!
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.
Saw Bunny CDN's Optimizer, looks really powerful. Will be trying it out soon.
I’ll check that out! Can’t really trust optimizing images to users 😀
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
Nice post! Short and specific. Thanks!
Thanks alot!
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 about you take that 2 hours to write another landing page targetting a different market segment?
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:
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.
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.
@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.