A machine-readable guide to this site for AI agents and language models is available at/llms.txt(https://dev.acquia.com/llms.txt on the production site).
Drupal Canvas Server-Side Rendering (SSR) Experimental feature optimizes the delivery of Drupal Canvas components by rendering them as static HTML on the server. Content is present in the raw HTML response. This process makes the content instantly parseable by AI retrieval systems without the need to wait for JavaScript execution.
Drupal Canvas SSR provides the following capabilities:
To enable Drupal Canvas SSR:
After you enable the feature, Drupal Canvas SSR attempts to render all components on the server. The system automatically falls back to client-side rendering if a component fails to render on the server.
Categorize components into static or interactive types to ensure the correct setup.
Static components render exclusively on the server and do not ship JavaScript to the browser. These components are best for content-heavy elements that do not require user interaction, such as text blocks, hero images, and static layouts.
Components render as static if they meet the following conditions:
window, document, or localStorage, or SWR/fetch.Interactive components require JavaScript for hydration. These components are best for elements that require interactivity, such as counters, forms, and search bars. The server renders the initial HTML, and the browser then hydrates the HTML with JavaScript to enable interactivity.
You must add the 'use client'; directive at the top of the component file if the component requires the following interactive elements:
onClick, onChange, or onSubmit.useState, useEffect, or useRef.Drupal Canvas SSR attempts to render all components by default. The system falls back to client-side rendering (CSR) when the following conditions occur:
If this content did not answer your questions, try searching or contacting our support team for further assistance.
If this content did not answer your questions, try searching or contacting our support team for further assistance.