Contentful live preview frontend perspective 2026 hero en

Contentful Live Preview: What Your Frontend Has to Deliver

Contentful Live Preview lets editors see a draft right next to the entry editor and watch changes appear as they type. Contentful provides the preview pane, the Content Preview API and the Live Preview SDK, but the page inside that pane is your frontend. Whether the preview is accurate, fast and safe depends on how that frontend handles drafts, caching, indexing and locales.

What Contentful Live Preview consists of

Live Preview combines four building blocks. Naming them early helps your team scope the work.

  • Content preview URLs: in the Contentful web app you define a preview URL per content type. That URL points to your website or storefront, the page that renders the draft.
  • Content Preview API: drafts come from a separate API at preview.contentful.com. It needs its own preview access token, production Delivery API tokens do not work there, and it has its own rate limit that depends on your plan.
  • Live preview pane: editors see the page side by side with the entry editor. According to Contentful's documentation, this side by side view works without the SDK.
  • Live Preview SDK: the package @contentful/live-preview adds two advanced features. Inspector mode lets editors click an element in the preview and jump to its source field. Live updates show edits in the preview without a reload. The SDK supports plain JavaScript and React, including Next.js.

In short: Contentful manages content and drafts, your frontend renders what editors see.

What your frontend has to deliver

A preview that editors trust needs the frontend to handle six jobs. If you are still planning the Contentful connection itself, our practical tips for connecting Contentful from the frontend cover the groundwork.

  1. Render drafts on request. In preview mode, the frontend queries the Preview API with the preview token instead of the Delivery API. The token stays on the server and never ships in the browser bundle.
  2. Render server side without cache. A preview response must not land in a CDN, a reverse proxy or a framework cache. Otherwise editors see stale drafts, or shoppers see a draft.
  3. Keep preview pages out of search. Every preview URL needs noindex, nofollow, regardless of the page's normal SEO settings.
  4. Tag fields for inspector mode. Elements get data attributes such as data-contentful-entry-id and data-contentful-field-id, or the SDK helper getProps. Contentful recommends tagging larger elements and whole referenced entries rather than every small element or styling parameter. On Premium plans, Content Source Maps can automate part of this tagging.
  5. Handle locales explicitly. The SDK is initialized with a locale, and live updates do not support multiple locales in one GraphQL query. Preview localization, meaning a locale switcher in live preview and custom preview tokens per market, is available on Premium plans.
  6. Allow embedding. The preview runs in an iframe inside the Contentful web app. Your frontend must allow this through a Content-Security-Policy with frame-ancestors for app.contentful.com instead of a blocking X-Frame-Options header, and cookies need SameSite=None and Secure.

Common pitfalls

Preview shows something different from live

The most frequent cause is references. The Preview API resolves linked entries that are still drafts, while the Delivery API only returns published content. A teaser looks complete in preview and is missing after publishing. Other typical causes are a different environment in the preview URL or a locale fallback that only applies on one side.

Performance in preview

Preview is uncached by design, so every view hits the Preview API and your rendering. On pages with many references, the rate limit becomes noticeable, so plan lean preview queries.

Layout fields in the content model

When teams want the preview to look right, they often add fields for colors, spacing or column counts to content types. The model grows, entries become harder to reuse across channels, and every layout change turns into a content change. Content belongs in Contentful, layout decisions belong in the frontend layer.

The preview token as a shared secret

A preview token grants access to unpublished content. Treat it like a staging password, rotate it when people leave, and update every preview URL that contains it.

How Laioutr fits in

Contentful is the content layer: models, entries, drafts, the Preview API and the live preview pane. Laioutr is the Frontend Management Platform (FMP): the frontend that renders this content together with product data, plus the editor your team uses to compose pages. The two complement each other.

Content Preview in the Laioutr frontend. Any storefront URL opened with a preview token is rendered against unpublished content. The token is a project setting in Cockpit, separate from other secrets and separately rotatable, and it is meant to be pasted into CMS preview URL templates such as Contentful's content preview URLs. The server verifies the token, renders the page server side and sends it with Cache-Control private, no-store. Orchestr's caches are bypassed, and any presented token forces noindex, nofollow. A wrong token simply renders the published page. A valid token, however, opens all unpublished content of the project, so share it like a staging password. One detail for your runbook: a rotated token takes effect after the next deployment.

Studio as the visual editor. Studio, the visual editor of Laioutr, shows a live preview of the storefront while your team arranges sections and blocks, switches markets and languages and checks device views. Its "Show preview content" toggle sends the same preview token, so unpublished content from connected sources can appear inside the real page layout, provided the connector supports preview. Publishing remains a deliberate step taken by a person.

The Contentful connection reads content through the Content Delivery API, including localization and multiple environments. Content Preview gives every connector a server-verified preview signal; whether your Contentful setup switches to the Preview API with it is something we check together in a demo. For the editorial side of the same setup, read Contentful visual editing: the marketer layer.

A checklist for your preview setup

  1. Define a preview URL for each content type that renders as its own page.
  2. Store the preview token server side and document who has access.
  3. Disable all caches for preview responses, including framework route rules.
  4. Enforce noindex, nofollow on every preview URL.
  5. Test drafts with unpublished references before go-live.
  6. Decide which elements get inspector tags and keep layout fields out of the content model.
  7. Test preview for every locale and market you publish.

FAQ

Do I need the Live Preview SDK for Contentful Live Preview?

Not for the side by side view. You need the SDK for inspector mode and live updates.

Why does my preview show content that is missing on the live site?

Usually a referenced entry is still a draft. The Preview API returns it, the Delivery API does not. Publish references first or check them as part of your release routine.

Should preview pages be cached?

No. Preview content changes constantly and is meant only for editors. Render it server side, deliver it uncached and mark it noindex.

Does Laioutr replace Contentful Live Preview?

No. Contentful remains your content layer, and its live preview stays useful for editing entries. Laioutr adds the frontend with a server-verified, uncached preview mode and Studio for composing the pages around that content.

Next steps

Want to see how Contentful content looks in a real storefront with Studio? Book a demo and bring one of your content types. We will walk through preview URLs, locales and caching with your setup in mind.

More from the Laioutr Platform

Altri articoli interessanti

Conoscenza pratica su sviluppo frontend, agenti intelligenti e headless

App Shopify
Shopify
Shopify è una piattaforma di commerce per vendere online e nei negozi fisici.
App shopware
Shopware
Shopware è una piattaforma e-commerce europea e flessibile per cataloghi prodotto e commerce omnicanale.
App adobe commerce
Adobe Commerce
Adobe Commerce è una piattaforma di enterprise commerce per scenari B2C e B2B complessi e globali.
Planned
App B2B sellers suite
B2Bsellers
Suite B2B per Shopware che trasforma lo shop online in una piattaforma professionale di commerce B2B.
Planned
App commerce layer
Commerce Layer
Commerce Layer è una piattaforma di headless commerce per rendere disponibili online inventari e cataloghi.
App commercetools
Commercetools
Commercetools è una piattaforma e-commerce headless basata su SaaS e utilizzata in tutto il mondo.
App emporix
Emporix
Emporix è una piattaforma di commerce composable e API-first per scenari B2B e B2C scalabili.
Planned
App HCL Software
HCL Software
Suite enterprise per commerce ed esperienze digitali, altamente configurabile.
Planned
App intershop
Intershop
Piattaforma di enterprise commerce per modelli di business B2B e B2C complessi.
Planned
App magento 2
Magento 2
Piattaforma di commerce estendibile e molto diffusa per scenari B2C e B2B.
App Oxid
OXID eShop
OXID eShop è una piattaforma di commerce estendibile per requisiti B2B e B2C complessi.
Planned
App cover patchworks
Patchworks
Patchworks è un iPaaS low-code che collega e-commerce, ERP, WMS, 3PL e marketplace.
Planned
App PRESTASHOP
Prestashop
Piattaforma di commerce open source per merchant piccoli e medi in Europa e oltre.
Planned
App saleor
Saleor
Piattaforma di commerce open source e API-first basata su GraphQL per storefront personalizzati.
Planned
App Commercecloud
Salesforce Commerce Cloud
Salesforce Commerce Cloud è una piattaforma di enterprise commerce basata su cloud per aziende di ogni dimensione.
Planned
App SAP
SAP Commerce Cloud
Piattaforma di enterprise commerce per cataloghi complessi, modelli di prezzo e journey omnicanale.
Planned
App SCAYLE
Scayle
SCAYLE è un commerce engine con cui brand e retailer fanno scalare il proprio business.
Planned
App spryker
Spryker
Piattaforma di commerce composable per modelli di business B2B e B2C esigenti.
App Sylius
Sylius
Sylius è un framework e-commerce developer-friendly per esperienze di shopping B2C e B2B.
Planned
App vendure
Vendure
Vendure è una piattaforma di headless commerce per aziende con requisiti complessi.
Coming Soon
App VTEX
VTEX
Piattaforma di commerce cloud-native e composable per B2B e B2C su larga scala.
Planned
App Websale
Websale
Backend di commerce stabile e adatto all'enterprise per ambienti retail complessi.
Book a demo mobile
Colloquio strategico

Pronti a trasformare il vostro frontend in un livello di controllo?

Mostrateci il vostro stack, la vostra roadmap, il vostro scenario di replatforming: vi mostriamo come si integra Laioutr, quanto costa e quanto velocemente andrete live.

"Dopo 30 minuti abbiamo capito che Laioutr rende fattibile il nostro replatforming." - Daniel B., CEO, hygibox.de

SEO / GEO / AEO Ready
Performance e Core Web Vitals
WCAG 3.0 Ready
Tracciamento & Analytics
Coerenza del brand