Skip to content

Commit 7f7daca

Browse files
Directly recommend setting remote: true when mentioning remote bindings (#25289)
* Directly recommend setting `remote: true` when mentioning remote bindings * PCX Review --------- Co-authored-by: Jun Lee <[email protected]>
1 parent a3b2778 commit 7f7daca

File tree

15 files changed

+42
-18
lines changed

15 files changed

+42
-18
lines changed

src/content/docs/browser-rendering/faq.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ If you cannot find the answer you are looking for, join us on [Discord](https://
2525
Not yet. Local development currently has the following limitation(s):
2626
- Requests larger than 1 MB are not supported.
2727

28-
For full feature access, set the browser rendering as a [remote binding](/workers/development-testing/#remote-bindings).
28+
<Render file="remote-binding-note" product="workers" />
2929

3030
### Will Browser Rendering bypass Cloudflare's Bot Protection?
3131

src/content/docs/browser-rendering/how-to/ai.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ async function getLLMResult(env, prompt: string, schema?: any) {
259259
}
260260
```
261261

262-
You can run this script to test it using [remote bindings](/workers/development-testing/#remote-bindings):
262+
You can run this script to test it via:
263263

264264
```sh
265265
npx wrangler dev

src/content/docs/browser-rendering/how-to/pdf-generation.mdx

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@ sidebar:
55
order: 1
66
---
77

8-
import { Aside, WranglerConfig, PackageManagers } from "~/components";
8+
import { Aside, WranglerConfig, PackageManagers, Render } from "~/components";
99

1010
As seen in [this Workers bindings guide](/browser-rendering/workers-bindings/screenshots/), Browser Rendering can be used to generate screenshots for any given URL. Alongside screenshots, you can also generate full PDF documents for a given webpage, and can also provide the webpage markup and style ourselves.
1111

1212
You can generate PDFs with Browser Rendering in two ways:
1313

14-
- **[REST API](/browser-rendering/rest-api/)**: Use the the [/pdf endpoint](/browser-rendering/rest-api/pdf-endpoint/). This is ideal if you don't need to customize rendering behavior.
15-
- **[Workers Bindings](/browser-rendering/workers-bindings/)**: Use [Puppeteer](/browser-rendering/platform/puppeteer/) or [Playwright](/browser-rendering/platform/playwright/) with Workers Bindings for additional control and customization.
14+
- **[REST API](/browser-rendering/rest-api/)**: Use the the [/pdf endpoint](/browser-rendering/rest-api/pdf-endpoint/). This is ideal if you don't need to customize rendering behavior.
15+
- **[Workers Bindings](/browser-rendering/workers-bindings/)**: Use [Puppeteer](/browser-rendering/platform/puppeteer/) or [Playwright](/browser-rendering/platform/playwright/) with Workers Bindings for additional control and customization.
1616

1717
Choose the method that best fits your use case.
1818

@@ -38,6 +38,8 @@ browser = { binding = "BROWSER" }
3838

3939
</WranglerConfig>
4040

41+
<Render file="remote-binding-note" product="workers" />
42+
4143
4. Replace the contents of `src/index.ts` (or `src/index.js` for JavaScript projects) with the following skeleton script:
4244

4345
```ts
@@ -257,7 +259,7 @@ export default {
257259
};
258260
```
259261

260-
You can run this script to test it using [remote bindings](/workers/development-testing/#remote-bindings):
262+
You can run this script to test it via:
261263

262264
<PackageManagers type="exec" pkg="wrangler" args="dev" />
263265

src/content/docs/browser-rendering/platform/wrangler.mdx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,4 +44,6 @@ After the binding is declared, access the DevTools endpoint using `env.MYBROWSER
4444
const browser = await puppeteer.launch(env.MYBROWSER);
4545
```
4646

47-
Run `npx wrangler dev` to test your Worker locally. You can also set the browser binding as a [remote binding](/workers/development-testing/#remote-bindings) to test against a remote browser.
47+
Run `npx wrangler dev` to test your Worker locally.
48+
49+
<Render file="remote-binding-note" product="workers" />

src/content/docs/browser-rendering/workers-bindings/browser-rendering-with-DO.mdx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,9 @@ export class Browser {
210210

211211
## 6. Test
212212

213-
Run `npx wrangler dev` to test your Worker locally. You can also set the browser binding as a [remote binding](/workers/development-testing/#remote-bindings) to test against a remote browser.
213+
Run `npx wrangler dev` to test your Worker locally.
214+
215+
<Render file="remote-binding-note" product="workers" />
214216

215217
## 7. Deploy
216218

src/content/docs/browser-rendering/workers-bindings/reuse-sessions.mdx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,9 @@ Besides `puppeteer.sessions()`, we have added other methods to facilitate [Sessi
144144

145145
## 5. Test
146146

147-
Run `npx wrangler dev` to test your Worker locally. You can also set the browser binding as a [remote binding](/workers/development-testing/#remote-bindings) to test against a remote browser.
147+
Run `npx wrangler dev` to test your Worker locally.
148+
149+
<Render file="remote-binding-note" product="workers" />
148150

149151
To test go to the following URL:
150152

src/content/docs/d1/best-practices/local-development.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ sidebar:
55
order: 8
66
---
77

8-
import { WranglerConfig } from "~/components";
8+
import { WranglerConfig, Render } from "~/components";
99

1010
D1 has fully-featured support for local development, running the same version of D1 as Cloudflare runs globally. Local development uses [Wrangler](/workers/wrangler/install-and-update/), the command-line interface for Workers, to manage local development sessions and state.
1111

@@ -67,7 +67,7 @@ database_id = "c020574a-5623-407b-be0c-cd192bab9545"
6767

6868
</WranglerConfig>
6969

70-
Note that `wrangler dev` separates local and production (remote) data. A local session does not have access to your production data by default. To access your production (remote) database, set your D1 as a [remote binding](/workers/development-testing/#remote-bindings). Any changes you make when running against a remote database cannot be undone.
70+
Note that `wrangler dev` separates local and production (remote) data. A local session does not have access to your production data by default. To access your production (remote) database, set `"remote" : true` in the D1 binding configuration. Refer to the [remote bindings documentation](/workers/development-testing/#remote-bindings) for more information. Any changes you make when running against a remote database cannot be undone.
7171

7272
Refer to the [`wrangler dev` documentation](/workers/wrangler/commands/#dev) to learn more about how to configure a local development session.
7373

src/content/docs/d1/tutorials/build-an-api-to-access-d1/index.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ Upon successful execution, a new table will be added to your database.
280280

281281
:::note
282282

283-
The table will be created in the local instance of the database. If you want to add this table to your production database, set your database as a [remote binding](/workers/development-testing/#remote-bindings).
283+
The table will be created in the local instance of the database. If you want to add this table to your production database set `"remote" : true` in the D1 binding configuration. Refer to the [remote bindings documentation](/workers/development-testing/#remote-bindings) for more information.
284284

285285
:::
286286

src/content/docs/d1/tutorials/using-read-replication-for-e-com/index.mdx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -857,7 +857,9 @@ curl -X POST http://localhost:8787/api/product \
857857

858858
:::note
859859

860-
Read replication is only used when the application has been [deployed](/d1/tutorials/using-read-replication-for-e-com/#step-9-deploy-the-application). D1 does not create read replicas when you develop locally. To test it locally, you can set your database as a [remote binding](/workers/development-testing/#remote-bindings).
860+
Read replication is only used when the application has been [deployed](/d1/tutorials/using-read-replication-for-e-com/#step-9-deploy-the-application). D1 does not create read replicas when you develop locally.
861+
862+
To test it locally, you can set `"remote" : true` in the D1 binding configuration. Refer to the [remote bindings documentation](/workers/development-testing/#remote-bindings) for more information.
861863

862864
:::
863865

src/content/docs/kv/concepts/kv-bindings.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ export default {
6060

6161
When you use Wrangler to develop locally with the `wrangler dev` command, Wrangler will default to using a local version of KV to avoid interfering with any of your live production data in KV. This means that reading keys that you have not written locally will return `null`.
6262

63-
To have `wrangler dev` connect to your Workers KV namespace running on Cloudflare's global network, set your KV as a [remote binding](/workers/development-testing/#remote-bindings).
63+
To have `wrangler dev` connect to your Workers KV namespace running on Cloudflare's global network, set `"remote" : true` in the KV binding configuration. Refer to the [remote bindings documentation](/workers/development-testing/#remote-bindings) for more information.
6464

6565
<WranglerConfig>
6666

0 commit comments

Comments
 (0)