Magento is a very good ecommerce solution at the same time as they call it ‘an over engineered’ system which is not very light. But can we rule it out from the list of ecommerce softwares we would consider? Definitely not. Reasons are anything from Magento being open source to the community help and plugins’ availability. We help many of our clients with site speed optimization and performance boosting of their webshops. Here we will share some techniques we generally use. Most of these suggestions you can see from Google pagespeed insights.
1. Image Optimization
Make sure all the images used in the site, including banners and product images are saved for web. If you are using photoshop there is an option to save for web and devices. If the product images are high in size that will considerably slow down the site.
2. Leverage Browser caching
Browser caching using mod_expires
This is used in most dedicated/vps servers. Add the following code to htaccess and it will enable browser caching.
Browser caching with mod_headers
This is the method to use when working on a shared server.
<IfModule mod_headers.c> <FilesMatch "\.(ico|pdf|flv|jpg|jpeg|png|gif|js|css|swf)$"> Header set Expires "Wed, 15 Apr 2020 20:00:00 GMT" Header set Cache-Control "public" </FilesMatch> </IfModule>
3. Enable Gzip compression.
Read more about what is Gzip compression. Gzip compression allows the web servers to provide lower size files and there by decreasing the page load time. We need to have mod_deflate turned on in Apache. Add the following code to your .htaccess file in the root and check google pagespeed insights or Gtmetrix to see if its working properly.
5. Minify CSS, JS and HTML
Minifying CSS, JS and HTML will give us additional gain in saving the page size. There are plugins available like here that will help minifying JS, CSS and even HTML. This will remove all the whitespaces in the css and Js files and reduce considerable amount of size.
6. Use a Content Delivery Network
A content delivery network or CDN is a system of distributed servers that deliver web contents or especially static assets like JS, CSS and Images to a user from a geographically nearer location and there by speeding up the delivery. Lets say a user in India is accessing a website hosted in USA, the content delivery will have the latency to communicate with the server placed at a far location. If the website uses a CDN service which has its servers somewhere in India, then the contents will be delivered to the user from the CDN server in India reducing the latency.
Use a CDN for your site especially if you are targetting global consumers or if your server is hosted somewhere far than your target country.
7. Use Varnish caching to improve delivery performance.
Using varnish is an effective way to improve site performance. Varnish is a web application accelerator. You install it in front of any server that speaks HTTP and configure it to cache the contents. It will increase the delivery speed of the website by multiples.
We can help to speed up your magento store to load in less than 3 seconds. Need help implementing any of these? Contact us here!