High performance e-commerce website – How a Magento e-commerce website was optimized for less than 2 seconds load time
The call came through our emergency support channel. A Magento e-commerce website was seeing an increase in bounce rates (87%) and a dip in conversion rates. Analytics tools correlated the increased bounce rates with high page load times.
A preliminary analysis showed that the website loaded at an average of 9 seconds, with a maximum of 12 seconds in some cases. This was true user experience killer. Studies show that 51% of online shoppers cite site slowness as the top reason for site abandonment, and sites that loaded within 2 seconds decreased the bounce rates to less than 50%.
Site slowness is usually caused by un-optimized website and server configuration. So, to start off, we analyzed the bottlenecks caused by website configuration.
Website load sequence reveals what elements of a website holds up the rest of the page, and website logs show if the website has any execution errors. The audit found the following performance issues:
- Not all images were optimized, and some were up to 700 KB in size. This resulted in a total 2 seconds delay.
- The Java scripts were included in the header, and was loading even before the site outline was loaded. Loading of scripts took up to 3 seconds.
- There were several 404 errors, and several redirects. The wait time for resolving those requests contributed to up to 3 seconds of delay.
- A third party web analytics plugin was used which sent usage data to their server, but it had a wait delay of more than 2 seconds.
- MySQL response times were impacted by a 3 GB log size.
To resolve this, the following were done:
- Java scripts were deferred to the bottom of the page load sequence, and style sheets were loaded at the top.
- Images were optimized to be less than 100 KB in size, and where possible CSS sprites were used.
- Redirection rules were optimized to limit 301 redirects to just one hop.
- Java script and CSS files were merged to reduce minimize HTTP requests.
- White spaces in HTML, CSS and Java Scripts were removed (minified) to reduce the file size.
- An audit was done on all active plugins, and redundant or inefficient ones were deactivated.
- Log data was trimmed to retain only 1 month of logs. Cron task was set to do this automatically every week.
Once these changes were applied, we shed a good 5 seconds off the load time, and we then focused on server side optimization.
Bobcares helps high traffic websites to deliver consistent high performance through preventive maintenance and regular optimization. Are you looking for ways to keep your site top-notch?