Skip to main content

Introduction

Trident PRISM is a high-performance dynamic rendering proxy for single-page applications, built in Rust. It sits between your users and your SPA origin server, transparently rendering JavaScript-heavy pages for search engine crawlers and social media bots while passing normal browser traffic straight through.

The Problem​

Single-page applications built with React, Vue, Angular, or Magento PWA Studio render content entirely in JavaScript. When a search engine crawler or social media link previewer visits your site, it receives a near-empty HTML shell with a <script> tag. Most crawlers either cannot execute JavaScript at all or do so unreliably, which means your content never gets indexed and your link previews are blank.

How It Works​

PRISM operates as a reverse proxy between clients and your SPA origin:

┌──────────────┐
│ SPA Origin │
│ (React/Vue/ │
│ Angular) │
└──────▲───────┘
│
│ fetch page
│
┌────────┐ request ┌──────┴───────┐ render ┌──────────────┐
│ Client ├─────────────►│ PRISM ├──────────────►│ Headless │
│ │◄─────────────┤ │◄──────────────┤ Chrome │
└────────┘ response └──────────────┘ HTML └──────────────┘
│ ▲
│ │
▼ │
┌──────────────┐
│ LRU Cache │
└──────────────┘
  1. A request arrives at PRISM.
  2. PRISM inspects the User-Agent header against its bot pattern list.
  3. If the visitor is a bot: PRISM checks its cache. On a miss it fetches the page from the origin, renders it with a pooled headless Chrome tab, post-processes the HTML, caches the result, and returns fully rendered markup.
  4. If the visitor is a regular browser: PRISM proxies the request directly to the origin with zero overhead.

Key Features​

  • 70+ built-in bot patterns covering search engines (Google, Bing, Baidu, Yandex, DuckDuckGo), AI/LLM crawlers (GPTBot, ClaudeBot, PerplexityBot), social previews (Facebook, Twitter, LinkedIn, Discord, Slack, Telegram, WhatsApp), and SEO tools (Ahrefs, Semrush, Screaming Frog).
  • O(1) LRU cache with configurable max entries and TTL, device-aware variants, and admin purge/warmup APIs.
  • lol_html streaming post-processing for rewriting rendered HTML at wire speed.
  • Content validation ensuring rendered pages contain meaningful content before caching.
  • JSON-LD preservation so structured data survives the render pipeline.
  • SSRF protection preventing the renderer from being abused to reach internal networks.
  • Rate limiting to protect the render pool from excessive traffic.
  • Circuit breaker that trips on repeated Chrome failures and recovers automatically.
  • Chrome crash recovery with automatic tab and browser restart.
  • Two operating modes: bot-only (default, renders only for detected bots) and render-all (renders every request).
  • Admin API with health checks, Prometheus metrics, cache management, and warm-up endpoints.
  • 764 tests covering unit, integration, and end-to-end scenarios.

Who Should Use PRISM​

PRISM is for anyone running a JavaScript-rendered single-page application that needs to be visible to search engines and social media platforms. Typical use cases include:

  • React / Next.js (CSR mode) storefronts and marketing sites
  • Vue / Nuxt (SPA mode) applications
  • Angular applications
  • Magento PWA Studio and other headless commerce frontends
  • Any SPA where server-side rendering is not feasible or too costly to retrofit

Live Demo​

See PRISM in action at https://ssr-demo.trident-prism.com.