Generated at Build Time

2026-01-14 12:00:00

This timestamp stays the same no matter how many times you refresh. In production, this HTML file would be served directly without running PHP.

Total Views

24,521

+12.4% vs last period

Unique Users

8,294

+8.1% vs last period

Bounce Rate

42.3%

-2.1% vs last period

How SSG Works in PHP

# Build script: generate-static.php
<?php
$data = fetch_data();
$html = render_page($data);

// Write static HTML file
file_put_contents('public/page.html', $html);
echo "Generated at: " . date('Y-m-d H:i:s');
?>

# Then serve page.html directly via nginx/apache

Pros: Fastest possible response, minimal server load, CDN-friendly.

Cons: Data is stale until next build, requires rebuild for updates.

Best for: Marketing pages, documentation, blogs, landing pages.