Since the beginning of Fasterize, we have been offering an optimization on the execution of Javascript called Deferjs. This allows to execute the scripts of the pages in a deferred way without blocking the rendering of the page.

This optimization improves the Start Render and the Speed ​​Index but can, in certain cases, degrade the Time To Interact. The elements of the page built via Javascript of the carousel, popup type are indeed displayed in a second time.

Additionally, using DejerJs prevents browsers’ pre-scanner from starting to download scripts before they need to be executed.

 

 

Preload, prefetch: what’s the difference?

There are two tags that allow you to download a resource without executing it:

  • the “link rel=prefetch” tag supported by all recent browsers.
  • the “link rel=preload” tag only supported by Chrome.

The “link rel=prefetch” tag triggers a download with low priority. In practice, it is useful for resources that are likely to be useful in future browsing.

On the contrary, the “link rel=preload” tag triggers an immediate download with a priority based on the nature of the downloaded resource. The resource is usable during current navigation.

DeferJS Limits Exceeded

Recently, the situation has changed in terms of the possibilities offered by browsers.
Since Chrome 51 and soon for Firefox, it is possible to use the HTML tag “link rel=preload” to preload resources.
The use cases are numerous and are described here >>

Fasterize integrates DeferJS Preload

The optimization engine developed by Fasterize now takes advantage of this “link rel=preload” tag to download all the scripts upstream. They are then already available when they are executed orchestrated by Deferjs.

By implementing this optimization on our engine, we reduce loading times even further. The impact is clearly visible: the Time To Interact arrives much earlier in the majority of cases.

NB. It should be noted that, like all webperf optimizations, this is a trade-off since pre-loaded JS resources may compete with critical resources.

This feature is not enabled by default on the engine. So if you want to benefit from it, just go to your dashboard and enable it.

Did you like this article?



Leave a Reply