Skip to main content

implement-server-side-rendering

Implement server-side rendering with deterministic hydration, correct status and metadata, safe caching, and observable failure behavior. Use when routes need useful first responses for users, crawlers, sharing, or performance.

Datos de origen

Repositorio
protosphinx/sphinxstack
Última actividad en el origen
29 de julio de 2026 a las 13:55
Idioma detectado de SKILL.md
inglés
Estrellas
3
Forks
0

Opciones de instalación

De forma predeterminada está seleccionado el prompt que primero revisa el origen. Puedes cambiar a un comando directo o descargar una copia local.

Revisa los archivos de origen

Lee SKILL.md y los archivos complementarios que muestra SkillsMP antes de decidir si quieres instalarlo.

Explorador de archivos
2 archivos

Mostrando SKILL.md

SKILL.md
Instrucciones de origen · Vista previa de solo lectura
name
implement-server-side-rendering
category
web
description
Implement server-side rendering with deterministic hydration, correct status and metadata, safe caching, and observable failure behavior. Use when routes need useful first responses for users, crawlers, sharing, or performance.
# implement-server-side-rendering Make the server response a complete, truthful representation of route state. ## When to use - Use for public content, commerce, authenticated application shells, or routes harmed by client-only startup. - Avoid SSR when static generation or a simpler server-rendered page meets the need. ## Procedure 1. Classify routes by public, personalized, authenticated, static, dynamic, cacheable, streaming, and mutation behavior. 2. Define server data dependencies, timeouts, authorization, locale, experiment, device, and error boundaries. 3. Render valid content, landmarks, links, forms, title, canonical, metadata, and the correct HTTP status in the initial response. 4. Serialize only the minimum hydration state with safe escaping; never expose secrets or data from another user or tenant. 5. Make server and client output deterministic across clocks, random values, identifiers, locale, browser-only APIs, and feature flags. 6. Hydrate without replacing focus, user input, or server-visible content. Detect and fail tests on mismatches. 7. Set cache keys and private/public directives from every representation-changing input. Keep authenticated data out of shared caches. 8. Design loading, streaming, timeout, not-found, redirect, and dependency failure behavior with correct status semantics. 9. Instrument server time, data time, render time, hydration errors, route failures, cache behavior, and client recovery. 10. Test view source, JavaScript disabled, slow and failed dependencies, authenticated isolation, locale, bots, navigation, forms, and deploy-version skew. ## Failure plan - If SSR fails, return a controlled error or safe shell with truthful status rather than another user's cached content. - If server and client versions differ, preserve compatible serialized state or hold rollout until parity is restored. ## Done - An SSR route matrix records data, auth, metadata, status, cache, streaming, and hydration decisions - Tests prove deterministic output, user and tenant isolation, correct statuses, no-JavaScript usefulness, and client recovery - Runtime evidence reports performance, cache behavior, hydration mismatches, dependency failures, and safe rollback
Ver en GitHub