Set Cache TTL for Sitecore CDP/Personalize CloudFront JavaScript libraries for faster website performance
Website performance is one of the key measures or KPI that organizations look for when they build any intranet or public facing websites. It is estimated that every second that a website takes longer to load loses 10% of its visitors.
The slowness of a website not only comes from its own resources like css, server-side code, html, images but also the 3rd party client-side JavaScript libraries. In fact, most of the website performance slowness is attributed to these 3rd party libraries.
The problem only amplifies with Composable SaaS products like CDP and Personalize.
In one of the client projects that I was working on earlier this year, the client had specific performance that "all webpages should get a score of 90 and above in the Lighthouse report".
If you don't know what Lighthouse is - read this page to learn about it.
Google Lighthouse is a very popular website performance test that has browser extensions available to test your website from the comfort of your browser.
If you try to hook your website with Sitecore CDP/Personalize, it loads 2 javascript libraries:
- boxever-<version>.min.js (ex: boxever-1.4.9.min.js)
- version.min.js
cache-control: public, max-age=31536000 response header must be added to all CDPJavaScript libraries loaded via CloudFront
Comments
Post a Comment