Skip to Main Content
Customer Feedback

We love feedback from you on our products and the problems in your daily work that you would like us to solve. Please describe the challenge you're encountering and your desired outcome. Be as detailed as possible.

For technical issues or bugs please head to Support or our Developer Community. You can assign up to 20 votes in total. Thank you for your feedback.

Status explanation: 'Future Consideration' = Continuing to collect further feedback, not planned at this time. 'Investigating' = Prioritized for deeper customer and feasibility investigations ahead of planning development.

Categories APIs
Created by Guest
Created on Sep 5, 2024

Serve previous revisions of datafiles from Optimizely CDN

As a web developer I need to ensure that every point in a request lifecycle uses the same version of an Optimizely datafile to ensure a page is rendered correctly. This includes:

  • edge function logic

  • serverside render

  • clientside hydration

If there is a mismatch in Optimizely datafile versions between edge function logic and serverside render, then the incorrect decision could be used to generate a page that is saved into the CDN cache. If there is a mismatch in Optimizely datafile versions between the serverside render and the clientside hydration, then hydration mismatch bugs will occur.

Optimizely's current recommendation seems to be for customers to serialise the datafile during the serverside render into the HTML of the page so the client side can use the same version. But this results in page bloat.

It would be better if the edge function could tell the serverside render which revision of a datafile it used, and then for server to fetch this specific revision of the datafile from the Optimizely CDN. And similarly for the server to tell the client which revision to fetch.

For example, given a project ID of 12345, the latest version of the datafile is served at https://cdn.optimizely.com/json/12345.json

Optimizely could also serve previous versions of this datafile from its CDN, for example https://cdn.optimizely.com/json/12345.json?revision=6, https://cdn.optimizely.com/json/12345.json?revision=5, https://cdn.optimizely.com/json/12345.json?revision=4,