Skip to content

Commit 91e869f

Browse files
irvinebroquetanushree-sharmathomasgauvindcpena
authored
Make Compat Matrix more comprehensive (#17303)
* Make Compat Matrix more comprehensive Attempts to cover all the differences between Workers and Pages * Apply suggestions from code review Co-authored-by: Tanushree <[email protected]> * Apply suggestions from code review Co-authored-by: Thomas Gauvin <[email protected]> Co-authored-by: Denise Peña <[email protected]> * Update src/content/docs/workers/static-assets/compatibility-matrix.mdx Co-authored-by: Denise Peña <[email protected]> --------- Co-authored-by: Tanushree <[email protected]> Co-authored-by: Thomas Gauvin <[email protected]> Co-authored-by: Denise Peña <[email protected]>
1 parent 8c2e3ed commit 91e869f

File tree

1 file changed

+57
-20
lines changed

1 file changed

+57
-20
lines changed

src/content/docs/workers/static-assets/compatibility-matrix.mdx

Lines changed: 57 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -17,29 +17,42 @@ import {
1717
Tabs,
1818
} from "~/components";
1919

20-
Cloudflare [Workers with static assets](/workers/static-assets/) and [Pages](/pages/) both have the ability to host front-end and full-stack applications. The following compatibility matrix shows the features are available for each product to help you when choosing which product to start with.
20+
You can deploy full-stack applications, including front-end static assets and back-end APIs and server-side rendered pages (SSR), to both Cloudflare [Workers](/workers/static-assets/) and [Pages](/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](https://github.com/cloudflare/cloudflare-docs/edit/production/src/content/docs/workers/static-assets/compatibility-matrix.mdx) or [create a GitHub issue](https://github.com/cloudflare/cloudflare-docs/issues/new).
2121

2222
We plan to bridge the gaps between Workers and Pages and provide ways to migrate your Pages projects to Workers.
2323

24-
| | Asset hosting on Workers | Pages |
24+
25+
| | Workers | Pages |
2526
| ----------------------------------------------------------------------------------- | ------------------------ | ----- |
26-
| **Features** | | |
27-
| Middleware | ❌ <sup>1</sup> ||
28-
| [Redirects](/pages/configuration/redirects/) | ❌ <sup>2</sup> ||
29-
| [Smart Placement](/workers/configuration/smart-placement/) | ⏳ <sup>3</sup> ||
27+
| **Writing, Testing, and Deploying Code** | | |
28+
| [Rollbacks](/workers/configuration/versions-and-deployments/rollbacks/) |||
3029
| [Gradual Deployments](/workers/configuration/versions-and-deployments/) |||
30+
| [Preview URLs](/workers/configuration/previews) |||
31+
| [Testing tools](/workers/testing) |||
32+
| [Local Development](/workers/testing/local-development/) |||
33+
| [Remote Development (`--remote`)](/workers/wrangler/commands/) | ✅ <sup>1</sup> ||
34+
| [Quick Editor in Dashboard](https://blog.cloudflare.com/improved-quick-edit) |||
35+
| **Static Assets** | | |
36+
| [Early Hints](/pages/configuration/early-hints/) |||
37+
| [Custom HTTP headers for static assets](/pages/configuration/headers/) | 🟡 <sup>2</sup> ||
38+
| [Middleware](/pages/functions/middleware/) | 🟡 <sup>3</sup> ||
39+
| [Redirects](/pages/configuration/redirects/) | 🟡 <sup>4</sup> ||
40+
| [Smart Placement](/workers/configuration/smart-placement/) | ⏳ <sup>5</sup> ||
3141
| **Observability** | | |
3242
| [Workers Logs](/workers/observability/) |||
33-
| [Logpush](/workers/observability/logs/logpush/) |||
34-
| [Tail Workers](/workers/observability/logs/tail-workers/) | ⏳ <sup>4</sup> ||
35-
| [Real-time logs](/workers/observability/logs/real-time-logs/) |||
36-
| **Bindings** | | |
43+
| [Logpush](/workers/observability/logs/logpush/) |||
44+
| [Tail Workers](/workers/observability/logs/tail-workers/) | ⏳ <sup>6</sup> ||
45+
| [Real-time logs](/workers/observability/logs/real-time-logs/) |||
46+
| **Runtime APIs & Compute Models** | | |
47+
| [Node.js Compatibility Mode](/workers/runtime-apis/nodejs/) |||
48+
| [Durable Objects](/durable-objects/api/) || 🟡 <sup>7</sup> |
49+
| [Cron Triggers](/workers/configuration/cron-triggers/) |||
50+
| **Bindings** | | |
3751
| [AI](/workers-ai/get-started/workers-wrangler/#2-connect-your-worker-to-workers-ai) |||
3852
| [Analytics Engine](/analytics/analytics-engine) |||
3953
| [Assets](/workers/static-assets/binding/) |||
4054
| [Browser Rendering](/browser-rendering) |||
4155
| [D1](/d1/build-with-d1/d1-client-api/) |||
42-
| [Durable Objects](/durable-objects/api/) |||
4356
| [Environment Variables](/workers/configuration/environment-variables/) |||
4457
| [Hyperdrive](/hyperdrive/) |||
4558
| [KV](/kv/) |||
@@ -51,22 +64,46 @@ We plan to bridge the gaps between Workers and Pages and provide ways to migrate
5164
| [Secrets](/workers/configuration/secrets/) |||
5265
| [Service bindings](/workers/runtime-apis/bindings/service-bindings/) |||
5366
| [Vectorize](/vectorize/get-started/intro/#3-bind-your-worker-to-your-index) |||
67+
| **Builds (CI/CD)** | | |
68+
| [Monorepos](/workers/ci-cd/builds/advanced-setups/) |||
69+
| [Build Watch Paths](/pages/configuration/build-watch-paths/) |||
70+
| [Deploy Hooks](/pages/configuration/deploy-hooks/) |||
71+
| [Build Caching](/pages/configuration/build-caching/) |||
72+
| [Custom Preview Branches](/pages/configuration/branch-build-controls/) |||
73+
| [Custom Branch Aliases](/pages/how-to/custom-branch-aliases/) |||
74+
| **Pages Functions** | | |
75+
| [File-based Routing](/pages/functions/routing/) | ❌ <sup>8</sup> ||
76+
| [Pages Plugins](/pages/functions/plugins/) | ❌ <sup>9</sup> ||
77+
5478

55-
<sup>1</sup> If you need to run a Worker script ahead of serving static assets,
56-
we currently recommend using [Service
79+
<sup>1</sup> For more details on which bindings are supported in remote development, [refer to the docs](/workers/testing/local-development/#supported-resource-bindings-in-different-environments).
80+
81+
<sup>2</sup> Similar to <sup>1</sup>, to customize the HTTP headers that
82+
are returned by static assets, you can use [Service
5783
bindings](/workers/runtime-apis/bindings/service-bindings/) to connect a Worker
58-
in front of the Worker with assets. We plan to explore additional configuration
84+
in front of the Worker with assets.
85+
86+
<sup>3</sup> If you need to run a Worker before serving static assets,
87+
you can create a separate Worker that acts as middleware, and then use [Service
88+
bindings](/workers/runtime-apis/bindings/service-bindings/) to forward the request
89+
to the Worker with assets. We plan to explore additional configuration
5990
to support more complex routing in the future.
6091

61-
<sup>2</sup> You can handle redirects by adding code to your Worker (a
92+
<sup>4</sup> You can handle redirects by adding code to your Worker (a
6293
[community package](https://npmjs.com/package/redirects-in-workers) is available
6394
for `_redirects` support), or you can use [Bulk
6495
Redirects](/rules/url-forwarding/bulk-redirects/).
6596

66-
<sup>3</sup> You cannot yet enable [Smart
67-
Placement](/workers/configuration/smart-placement/) projects with static assets.
68-
This is a temporary limitation, we are working to remove it.
97+
<sup>5</sup> You cannot yet enable [Smart
98+
Placement](/workers/configuration/smart-placement/) for Workers with static assets.
99+
This is a temporary limitation we are working to remove.
69100

70-
<sup>4</sup> You cannot yet add a [Tail
101+
<sup>6</sup> You cannot yet add a [Tail
71102
Worker](/workers/observability/logs/tail-workers/) to a project with assets.
72-
This is a temporary limitation, we are working to remove it.
103+
This is a temporary limitation we are working to remove.
104+
105+
<sup>7</sup> To [use Durable Objects with your Cloudflare Pages project](/pages/functions/bindings/#durable-objects), 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.
106+
107+
<sup>8</sup> Workers [supports popular frameworks](/workers/frameworks/), many of which implement file-based routing.
108+
109+
<sup>9</sup> 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.

0 commit comments

Comments
 (0)