Skip to content

Commit cf4f657

Browse files
authored
PCX-19650: add preconnect to Turnstile docs
1 parent 79d43a4 commit cf4f657

File tree

1 file changed

+7
-1
lines changed
  • src/content/docs/turnstile/get-started/client-side-rendering

1 file changed

+7
-1
lines changed

src/content/docs/turnstile/get-started/client-side-rendering/index.mdx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,14 @@ Add the Turnstile JavaScript API to your HTML.
5757
The `api.js` file must be fetched from the exact URL shown above. Proxying or caching this file will cause Turnstile to fail when future updates are released.
5858
:::
5959

60-
#### 2. Add widget elements
60+
#### 2. Optimize performance with resource hints (optional)
61+
Add resource hints to improve loading performance by establishing early connections to Cloudflare servers. Place this `<link>` tag in your HTML `<head>` section before the Turnstile script.
6162

63+
```html wrap
64+
<link rel="preconnect" href="https://challenges.cloudflare.com">
65+
```
66+
67+
#### 3. Add widget elements
6268
Add widget containers where you want the challenges to appear on your website.
6369

6470
```html wrap

0 commit comments

Comments
 (0)