10 Things You Can Do to Speed Up Your Web Pages
The average online shopper expects a website to load in three seconds or less. Yet despite aggressive user expectations, a recent study of the top 500 e-commerce sites finds that retail pages are slowing down.
According to Radware's State of the Union for E-Commerce Web Performance, a typical retailer's homepage takes 10 seconds to fully load and 5.4 seconds to display primary content, well short of the three-second goal for an ideal user experience.
This shortfall comes with a price tag. Slower pages translate to higher bounce rates, lower conversion rates and lost revenue. To illustrate, Wal-Mart found that when load times slowed from one second to four seconds, conversions declined sharply. For every second of improvement, the retailer experienced up to a 2 percent increase in conversions.
The main performance-leaching culprits are page size and page complexity. Today, the median web page contains 99 resources and is 1510 KB in size — 20 percent larger than the 1258 KB we measured just six months ago.
If you're a site owner determined to regain control over your website's performance, you can start by focusing on three key problem areas: images, latency and third-party content.
Optimize Your Images
Images comprise almost 60 percent of the average e-commerce page's total weight, and they represent a huge opportunity for optimization. Here are some ways how to ensure optimal performance for your images:
- Compress images. Smaller file sizes mean less payload travelling across the wire.
- Use progressive images instead of baseline images. In one study, progressive JPEGs improved median load time by 15 percent.
- Ensure that pages are structured to load feature images first. For many of the pages we studied, the feature image loaded last or almost last.
- Reformat images. An incorrectly formatted image can be several times larger than it needs to be. Rule of thumb: Photos should be in JPEG format, complex graphics should be in PNG-24 format and simple images with few colors should be in PNG-8 format.
Shorten the Roundtrip Time (RTT) for Your Page Resources
Roundtrip time (RTT) is the amount of time it takes for a host server to receive and process a request for a page's resources. RTT is subject to latency — i.e., the delay in getting content from point A to point B. The amount of latency depends largely on how far away the user is from the server. Here are some ways how to fix latency issues:
- Optimize your pages. Front-end optimization (FEO) techniques, which can be implemented manually or via an automated solution, alleviate latency by consolidating page resources into bundles and by leveraging the user's browser cache to do a better job of storing files for future reuse.
- Use a content delivery network. CDNs cache static page resources (e.g., images) in servers across a region or worldwide, bringing content closer to users and reducing RTT.
Control Third-Party Objects
Poorly implemented third-party scripts can block the rest of the page from rendering, and even cause pages to crash. Here are some ways how to protect your site from third-party delays:
- Defer third-party scripts. Deferral is a FEO technique that delays the execution of noncritical scripts until the rest of the page has rendered.
- Load scripts asynchronously. With asynchronous loading, third-party scripts load in parallel with crucial page content.
- Implement third-party timing and script killing. This technique involves establishing an allotted time for scripts to load. If a script fails to load within that time, it's either killed or deferred.
- Monitor script performance constantly. Real user monitoring tools allow you to keep an eye on the real-time performance of your scripts.
Retail sites will continue to grow in size and complexity, which means managing and optimizing web performance will require ongoing vigilance. The payoff is increased customer loyalty, measurable in visitor retention, more conversions and greater revenue.
Tammy Everts is performance evangelist at Radware, a provider of application delivery and application security solutions. She blogs about web performance on the Radware blog and at Web Performance Today.