Sommaire

Dynamic Cache available to all websites

Fasterize is a kind of super proxy that can optimize web page content on the fly. Our solution works for both static and dynamic pages.

In this article, we’ll look at how we’ve optimized our engine for these dynamic pages.

Not-so-dynamic dynamic pages

Our initial observation: some of the non-cacheable dynamic pages are in fact identical and are therefore re-optimized unnecessarily.

For example, the page of an e-commerce store is identical from one navigation to the next until the customer has filled the shopping cart. This means that the page can be 90% of the time the same, and 10% of the time customized according to the user session.

Step one: measure the impact of the phenomenon

The first action we took was to measure the extent of the phenomenon by calculating a hash of the content of each server response. We found that 30% of responses to dynamic pages were identical! And that we could therefore save 30% on engine optimizations!

We then looked at the realistic retention time required to maintain an optimized version of the page.

Keeping an optimized page for one minute seems to be sufficient for over 99% of pages.

68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f35303032342f3635343038332f35323466376164362d643465662d313165322d383464372d3366336531383965336332632e706e67

Step two: implement the algorithm

At the end of a page’s optimization, the engine keeps a copy for one minute, and this copy is associated with the hash of the original response. So, before optimizing, the engine checks that it hasn’t already optimized the page in the previous minute. If it has, the engine serves the already optimized version and avoids further optimization. This reduces optimization time on the page by around 60ms, taking the load off the engine.

One limitation we have observed is that some pages are artificially dynamic.
In fact, the content of the page may differ because a comment containing the date and time the page was generated or a random parameter is added to the URLs of static resources (which, by the way, also breaks the HTTP cache mechanism).

Dynamic Cache therefore enables our optimization engine to reduce the overhead it can add when optimizing a page. It’s important to note that this overhead mainly impacts the TTFB (Time To First Byte) of the page, and that the optimizations applied to the page can save much more than a few tens of milliseconds in overall loading time.

Table of contents
Get a free diagnosis of your site's loading times!

Published by

Partagez !

Discover other articles…

Monthly ranking of the most visited websites in the uk: travel, media, ecommerce. Based on Vitals Core Web, metrics that evaluate several aspects of your

We archive all webperf rankings to keep track of your positions.

We’re thrilled to announce that Fasterize will be making its debut at the Retail Technology Show, held on April 2nd and 3rd at ExCeL London,

Boost your site speed now with EdgeSpeed!