Rendering Modes
Explore different rendering strategies in vanilla PHP
SSR (Server-Side Rendering)
Default PHP behavior. Each request executes PHP on the server, generating fresh HTML every time.
- Always fresh data
- No cache complexity
- Slightly slower than cached
SSG (Static Site Generation)
Pre-generate static HTML at build time. Fastest possible response, served directly from disk/CDN.
- Fastest response time
- Minimal server load
- Data fixed at build time
ISR (Incremental Static Regen)
Cached static pages that revalidate after a time interval. Best of both worlds: speed + freshness.
- Fast cached responses
- Automatic revalidation
- 60s cache TTL
About PHP Rendering
Unlike JavaScript frameworks that offer multiple rendering strategies out of the box, vanilla PHP is synchronous and server-rendered by default. However, you can implement caching strategies (file-based, Redis, Memcached) to achieve SSG and ISR-like behavior. This demo shows how these concepts translate to the PHP world.