top of page

Forum Posts

Ohad Laufer
Jun 04, 2019
In Tips, Tutorials, Examples
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 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 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
1
133
Ohad Laufer
Mar 05, 2019
In Tips, Tutorials, Examples
Edit: the rollout is expected to resume tomorrow - March 12th If you've been following the action with Wix Turbo and Wix Code you'll know that Wix Turbo started supporting Code sites a little over a week ago, but that we stopped the rollout because of some issues. We fixed a bunch of them and are going to restart the rollout tomorrow (March 6th) at 2 am EST. While we hope we caught everything, if you come across a problem please post about it and use the #wixTurbo tag. 
7
110
5k

Ohad Laufer

More actions
bottom of page