Workers vs. Pages (compatibility matrix)
You can deploy full-stack applications, including front-end static assets and back-end APIs, as well as server-side rendered pages (SSR), to both Cloudflare Workers and Pages. The compatibility matrix below shows which features are available for each, to help you choose whether to build with Workers or Pages. Unless otherwise stated below, what works in Pages works in Workers, and what works in Workers works in Pages. Think something is missing from this list? Open a pull request ↗ or create a GitHub issue ↗.
We plan to bridge the gaps between Workers and Pages and provide ways to migrate your Pages projects to Workers.
Legend
✅: Supported
⏳: Coming soon
🟡: Unsupported, workaround available
❌: Unsupported
Workers | Pages | |
---|---|---|
Writing, Testing, and Deploying Code | ||
Rollbacks | ✅ | ✅ |
Gradual Deployments | ✅ | ❌ |
Preview URLs | ✅ | ✅ |
Testing tools | ✅ | ✅ |
Local Development | ✅ | ✅ |
Remote Development (--remote ) | ✅ 1 | ❌ |
Quick Editor in Dashboard ↗ | ✅ | ❌ |
Static Assets | ||
Early Hints | ❌ | ✅ |
Custom HTTP headers for static assets | 🟡 2 | ✅ |
Middleware | 🟡 3 | ✅ |
Redirects | 🟡 4 | ✅ |
Smart Placement | ⏳ 5 | ✅ |
Observability | ||
Workers Logs | ✅ | ❌ |
Logpush | ✅ | ❌ |
Tail Workers | ✅ | ❌ |
Real-time logs | ✅ | ✅ |
Runtime APIs & Compute Models | ||
Node.js Compatibility Mode | ✅ | ✅ |
Durable Objects | ✅ | 🟡 6 |
Cron Triggers | ✅ | ❌ |
Bindings | ||
AI | ✅ | ✅ |
Analytics Engine | ✅ | ✅ |
Assets | ✅ | ✅ |
Browser Rendering | ✅ | ✅ |
D1 | ✅ | ✅ |
Email Workers | ✅ | ❌ |
Environment Variables | ✅ | ✅ |
Hyperdrive | ✅ | ❌ |
KV | ✅ | ✅ |
mTLS | ✅ | ✅ |
Queue Producers | ✅ | ✅ |
Queue Consumers | ✅ | ❌ |
R2 | ✅ | ✅ |
Rate Limiting | ✅ | ✅ |
Secrets | ✅ | ✅ |
Service bindings | ✅ | ✅ |
Vectorize | ✅ | ✅ |
Builds (CI/CD) | ||
Monorepos | ✅ | ✅ |
Build Watch Paths | ✅ | ✅ |
Deploy Hooks | ❌ | ✅ |
Build Caching | ❌ | ✅ |
Custom Preview Branches | ❌ | ✅ |
Custom Branch Aliases | ❌ | ✅ |
Pages Functions | ||
File-based Routing | ❌ 7 | ✅ |
Pages Plugins | ❌ 8 | ✅ |
-
Does not currently support Workers with static assets. For more details on which bindings are supported in remote development, refer to the docs. ↩
-
Similar to 3, to customize the HTTP headers that are returned by static assets, you can use Service bindings to connect a Worker in front of the Worker with assets. ↩
-
If you need to run a Worker before serving static assets, you can create a separate Worker that acts as middleware, and then use Service bindings to forward the request to the Worker with assets. We plan to explore additional configuration to support more complex routing in the future. ↩
-
You can handle redirects by adding code to your Worker (a community package ↗ is available for
_redirects
support), or you can use Bulk Redirects. ↩ -
You cannot yet enable Smart Placement for Workers with static assets. This is a temporary limitation we are working to remove. ↩
-
To use Durable Objects with your Cloudflare Pages project, you must create a separate Worker with a Durable Object and then declare a binding to it in both your Production and Preview environments. Using Durable Objects with Workers is simpler and recommended. ↩
-
Workers supports popular frameworks, many of which implement file-based routing. ↩
-
Everything that is possible with Pages Functions can also be achieved by adding code to your Worker or by using framework-specific plugins for relevant third party tools. ↩