Christmas is coming… and with Christmas comes the sales season and peak loads. So to make the most of the return on investment from your promotional actions, here are a few tips for managing your peak load…
Fevad estimated the value of Christmas purchases on the Internet in 2013 at 10.3 billion euros (up 14% on 2012). Once again this year, 85% of French people are planning to do some of their Christmas shopping on the internet, and 1 in 5 is planning to spend more than last year. In short, Christmas is a key moment for all e-tailers, and managing peak loads is a real challenge at this time of year.Between two or three lines of code, David, developer at Fasterize, gives us some advice on how to optimize your site and better manage peak loads:
1. Configure the static resource cache (which is often poorly managed)
Whether you’re using a CDN or Fasterize, you can force caching (on cacheable resources, of course) for a set period of time. As a result, your servers don’t have to serve them and bear the load of requests associated with these resources.2. What about dynamic resources?
Compromise!-
-
- It’s not uncommon to have pages that can’t be hidden because of a small customized part of them. For example, the number of items in the shopping cart or the name of the logged-in user. In such cases, it’s possible to cache the page without these dynamic elements and then load them via a JS script. Admittedly, your page won’t be fully loaded for a short while, but the majority of the page will be visible much more quickly and will lighten the workload of your servers (which will no longer have to generate the complete page for all users).
- Perhaps you have an identical version for all your new users and a dynamic version for your returning visitors? If so, you can use the Smart Cache technique. This involves identifying new users and serving them a cached version. Returning visitors will continue to receive the dynamic version!
- Remember to cache your pages even for very short periods. For example, to withstand a “capital effect”, caching your home page for one minute, even if it contains dynamic elements, can save your life. In practical terms, the number of products shown in the shopping cart won’t be exact during the time your page is cached, but you’ll prevent your whole site from collapsing. Once again, it’s all about making compromises.
-
3. Reduce the number of requests
In webperf, there are a few best practices you can follow to reduce the number of requests.-
-
- concatenation: combine CSS and JavaScript files. This reduces the number of requests to your server from 10 JavaScript files to 2.
- Image lazyloading: only visible images are loaded from the start. The remaining images are loaded when the user scrolls. And if your user doesn’t scroll? You don’t load images unnecessarily. That’s enough to save you a lot of requests!
- image inlining: integrate small images directly into the page’s HTML code. This generates fewer requests.
- image spriting: like concatenation for JS / CSS files, this involves transforming several images into a single one. This applies to layout images (logo, button, etc.).
-
4. What about passing requests? Put them on a diet!
To avoid overloading bandwidth, reduce the weight of :-
-
- Minimizing JS/CSS/HTML files: remove all unnecessary characters from HTML pages, CSS and JavaScript resources.
- optimizing JPEG and PNG images to reduce their weight.
- GZIPing JS/CSS/HTML text resources and fonts: a few lines of configuration on the servers are enough to serve these resources in a compressed way to obtain minimum weight.
-
The second consequence of reducing the weight of your requests is to save on your bandwidth. Most web hosts and CDNs charge for their services according to the bandwidth used.
All these best practices will help you reduce the number of requests sent to the server and avoid unnecessary requests. To give you a concrete example, here’s the case of a leader in the cosmetics industry who consulted us with a view to managing peak loads during their private sales. We applied webperf’s best practices to their site, and here are the results (in blue: the optimized version / in red: the non-optimized version):
On this first graph, we see the weight of queries on an optimized page and a non-optimized page. The total weight of queries has been reduced by 46.53% between the optimized and non-optimized versions.

On this second graph, we analyze the number of queries, again on an optimized page and a non-optimized page. Here too, we can clearly see the benefits of an optimized site: we’ve reduced the total number of requests by 33.3%!
That’s it! With these tips, you’re all set to face Christmas and the traffic that goes with it. If you need support or expertise in managing your peak loads, don’t hesitate to contact us! We’ll help you get through the Christmas sales with peace of mind.
With Fasterize, you can automatically apply these best practices to your site. We’ll optimize your pages on the fly! Every day, we continue to improve our service and develop new features. Among those to come: Smart Caching! Test our solution now! You get one month free 🙂
Source: comarketing-news.fr and viuz.com