Skip to content

Commit 29b2348

Browse files
committed
Update Terraform link
1 parent 4fdfaba commit 29b2348

File tree

1 file changed

+14
-13
lines changed

1 file changed

+14
-13
lines changed

src/content/docs/speed/optimization/content/speed-brain.mdx

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
pcx_content_type: how-to
33
title: Speed Brain
4-
sidebar:
4+
sidebar:
55
order: 9
66
badge:
77
text: Beta
@@ -22,6 +22,7 @@ Speed Brain is a tool for improving web page performance by prefetching the most
2222
## Requirements
2323

2424
Speed Brain works under the following conditions:
25+
2526
- The Speed Brain feature is enabled in Cloudflare.
2627
- The browser of the web page visitor is using a Chromium-based browser version 121 or later.
2728
- The web page requested by the prefetch is eligible for cache.
@@ -43,15 +44,15 @@ The configuration looks like this:
4344

4445
```json
4546
{
46-
"prefetch": [{
47-
"source": "document",
48-
"where": {
49-
"and": [
50-
{ "href_matches": "/*", "relative_to": "document" },
51-
]
52-
},
53-
"eagerness": "conservative"
54-
}]
47+
"prefetch": [
48+
{
49+
"source": "document",
50+
"where": {
51+
"and": [{ "href_matches": "/*", "relative_to": "document" }]
52+
},
53+
"eagerness": "conservative"
54+
}
55+
]
5556
}
5657
```
5758

@@ -99,13 +100,13 @@ To disable Speed Brain, set `value:` to `"off"`.
99100

100101
</TabItem> <TabItem label="Terraform">
101102

102-
You can also configure Speed Brain using Terraform. For more details, refer to the [`cloudflare_zone_settings_override`](https://registry.terraform.io/providers/cloudflare/cloudflare/4.48.0/docs/resources/zone_settings_override) resource in the Terraform documentation.
103+
You can also configure Speed Brain using Terraform. For more details, refer to the `cloudflare_zone_settings_override` resource in the [Terraform documentation](https://registry.terraform.io/providers/cloudflare/cloudflare/latest/docs).
103104

104105
</TabItem> </Tabs>
105106

106107
## Caveats
107108

108-
- Since prefetch responses are not guaranteed to be rendered by the browser, Speed Brain includes two safeguards to minimize the risk of [unsafe prefetching](https://developer.mozilla.org/en-US/docs/Web/API/Speculation_Rules_API#unsafe_prefetching):
109+
- Since prefetch responses are not guaranteed to be rendered by the browser, Speed Brain includes two safeguards to minimize the risk of [unsafe prefetching](https://developer.mozilla.org/en-US/docs/Web/API/Speculation_Rules_API#unsafe_prefetching):
109110

110111
- Speed Brain will not prefetch on routes that run Workers. Without this safeguard, prefetch requests could inadvertently run Worker logic that assumes the incoming request is a normal (that is, not a prefetch) request. An example of this could be an incrementing page view counter running in a Worker. A page view counter should not increment if the page is not actually rendered in the browser.
111112

@@ -115,4 +116,4 @@ You can also configure Speed Brain using Terraform. For more details, refer to t
115116

116117
- Speed Brain will not work with restrictive [Content Security Policy](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/script-src) configurations using `strict-dynamic` or `nonce-{hash}` attributes.
117118

118-
- Currently, Speed Brain is not compatible with websites that use or rely on `pages.dev`.
119+
- Currently, Speed Brain is not compatible with websites that use or rely on `pages.dev`.

0 commit comments

Comments
 (0)