> To build or manage a Wix site with an AI agent, follow https://www.wix.com/headless/skill.md
> It builds a new Wix site or puts your own site online, from a prompt, and keeps changing it afterwards. The pages are code in any web technology, and Wix runs the backend.
> It works through the Wix plugin (the Wix MCP and the Wix skills), the Wix CLI or no Wix login, and puts the site live on Wix hosting or on another host.
> Business features include a store, bookings, events and tickets, a restaurant, a blog, forms, members and many more.
> Read the Wix skills online at https://www.wix.com/skills
> 
> Portal Navigation:
> 
> - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version.
> - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages).
> - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`).
> - If a reference page seems to be missing its schema (parameters, return types, or type definitions), append `?schema=true` to its `.md` URL (e.g. `https://dev.wix.com/docs/contexts/contexts/stores/category-info/use-category-info-context.md?schema=true`).
> - Top-level index of all portals: https://dev.wix.com/docs/llms.txt
> - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt

## Resource: About Page Rendering

## Article: About the Page Rendering Process

## Article Link: https://dev.wix.com/docs/develop-websites/articles/coding-with-velo/frontend-code/page-rendering/about-page-rendering.md

## Article Content:

# About Page Rendering

Page rendering is when your site's code is converted to a visual layout that's displayed in the browser. It occurs when visitors first enter your site, and for each subsequent page load, as they access different pages within the same site. To enhance performance, Wix render's your site code on the server and in the browser. You can use the [Rendering API](https://dev.wix.com/docs/velo/api-reference/wix-window-frontend/rendering/introduction.md) to control where your code runs in the rendering process.

## Supported IDEs

You can implement the Rendering API using:

- The [editor](https://dev.wix.com/docs/develop-websites/articles/workspace-tools/velo-workspace/code-editor-ide/working-in-the-code-editor.md) (Wix Studio and Wix Editor)
- The [Wix IDE](https://dev.wix.com/docs/develop-websites/articles/workspace-tools/velo-workspace/wix-ide/wix-studio-about-the-wix-ide.md) (Wix Studio)
- Your [local IDE](https://dev.wix.com/docs/develop-websites/articles/workspace-tools/developer-tools/git-integration-wix-cli/about-git-integration-wix-cli.md) (Wix Studio and Wix Editor)

## Rendering process

When a page request is made to the server, the server executes server-side rendering and once completed returns the HTML and all the necessary data to render the page. Once the browser gets the server response it displays the HTML immediately so the page is fully visible, though not yet responsive. Then, the browser runs the same page code again, adding the interactive actions. This double rendering occurs on initial site load, first on the server and then in the browser. Navigating to different pages on the same site, however, typically renders only once in the browser for each page load.

As a result of the double rendering, any code in your `onReady()` function may often execute twice, to provide faster initial loading time to access a site.

## Side effects

Because your `onReady()` runs twice during double rendering, it may produce side effects. For example, if your code inserts an item into a collection, that insertion occurs twice, unless you explicitly add code to prevent that from happening.

To avoid such unwanted side effects, use the [Rendering API](https://dev.wix.com/docs/velo/api-reference/wix-window-frontend/rendering/introduction.md) to conditionally control what code runs on the server or browser. You can also use [warmup data](https://dev.wix.com/docs/develop-websites/articles/coding-with-velo/frontend-code/page-rendering/about-warmup-data.md) to further optimize page loading.

## Test your code

Keep the following in mind when testing code that uses Rendering API.

- Rendering never occurs in the server when [previewing](https://support.wix.com/en/article/studio-editor-saving-previewing-and-publishing-your-site#previewing-a-site) your site.
- You can't see logs produced by `console.log()` calls in the [Developer Console](https://dev.wix.com/docs/develop-websites/articles/workspace-tools/testing-monitoring/testing-troubleshooting/about-debugging-your-code.md) or in your browser's [Developer Tools](https://dev.wix.com/docs/develop-websites/articles/workspace-tools/testing-monitoring/testing-troubleshooting/about-debugging-your-code.md) when they are performed on the server.

## See also

- [About warmup data](https://dev.wix.com/docs/develop-websites/articles/coding-with-velo/frontend-code/page-rendering/about-warmup-data.md)
- [Optimize page rendering with warmup data](https://dev.wix.com/docs/develop-websites/articles/coding-with-velo/frontend-code/page-rendering/optimize-page-rendering-with-warmup-data.md)
- [Webinar: Planning for scale: large data design considerations](https://youtu.be/BGnpQ_LTHPg?feature=shared&t=1464)