renderCycle and warmupData are now deprecated

A few months ago Wix announced the launch of Wix Turbo, which enables Wix sites to load much faster. As part of our continuous effort to make our sites dazzlingly fast, we’ve started using a more advanced approach to Server Side Rendering for Corvid sites.

Code you write runs in both the server and the browser. While the request is running in the server, the browser downloads and executes the same code. After the server returns the response and the page is visible, the browser also renders the page and makes it interactive .

We no longer wait for the server to finish and only then run the code in the browser. Therefore the code running in the browser is no longer aware of the renderCycle.

Due to these changes, we decided to deprecate 2 properties:

[**renderCycle**](https://www.wix.com/corvid/reference/wix-window.rendering.html#renderCycle) 
As explained above, the code no longer runs on the server and then in the browser, so  
there’s no meaning to renderCycle. This property will now always return “1”.  

[**warmupData**](https://www.wix.com/corvid/reference/wix-window.rendering.html#warmupData) 
Also due to the fact that the code is executed in parallel and there’s no telling which  
execution finishes first, there’s no way to pass data from server to browser in a reliable  
manner. 

In case you are using these properties in your code, we advise that you change it. Your code will not break due to the deprecation and keeping it won’t hinder your site’s performance.

A common use case for using these properties is to handle side effects. If you have an action inside onReady() that has side effects and you want to ensure it executes only once, the way to do so is to use wixWindow.rendering.env in order to determine where the code is being executed. If you want to ensure your code runs only once, implement this in your code:

if (wixWindow.rendering.env === "browser") {
    // perform code with side effects
}

For any questions and comments regarding this change, please use this thread.

1 Like

Hi! I would like to clarify the process on loading pages. My question doesn’t concern the rendering cycle, but I think it looks like.

I see that after the transition to Turbo technology, the process of loading pages has changed. When we go to the internal pages - the URL of the site changes immediately after the click. After that, there is a pause and wait for the content to load. The pause can be big. This is especially noticeable when working with dynamic pages.

On some sites, I use third-party code that I add to the body tag. Now my code is running at the moment of changing the URL. I would like the code to be loaded at the time of loading the content. Is it possible? I had no problems with this before. Thanks!