Skip to content

Commit d742859

Browse files
committed
Add note about the Unused Snippets tab
1 parent 1d2101b commit d742859

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

src/content/docs/rules/snippets/index.mdx

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,16 @@ For code samples addressing common use cases, please refer to the [Examples](/ru
2424

2525
## Snippets elements
2626

27-
To create and deploy a Snippet, you need to define the following elements:
27+
To create and deploy a snippet, you need to define the following elements:
2828

2929
- **Code snippet**: JavaScript code to be executed during the request-handling process.
30-
- **Snippet rule**: A [filter expression](/ruleset-engine/rules-language/expressions/) that determines which requests the Snippet will be applied to. Each Snippet can only be associated with one Snippet Rule.
30+
- **Snippet rule**: A [filter expression](/ruleset-engine/rules-language/expressions/) that determines which requests the Snippet will be applied to. Each snippet can only be associated with one snippet rule.
3131

32-
For more information, refer to the [How it works](/rules/snippets/how-it-works/) and [Create a snippet in the dashboard](/rules/snippets/create-dashboard/) sections.
32+
For more information, refer to [How it works](/rules/snippets/how-it-works/) and [Create a snippet in the dashboard](/rules/snippets/create-dashboard/).
33+
34+
:::note
35+
If you have used the Cloudflare API to create a code snippet that is not associated with a snippet rule, the Cloudflare dashboard will show that code snippet in a separate tab called **Unused Snippets**. You can either edit the snippet code and associate it with a snippet rule, or delete the unused code snippet.
36+
:::
3337

3438
## Templates
3539

@@ -41,9 +45,7 @@ For more information, refer to the [How it works](/rules/snippets/how-it-works/)
4145

4246
<FeatureTable id="rules.snippets" />
4347

44-
:::caution[Redirects will count as subrequests]
4548
Each <GlossaryTooltip term="Snippets subrequest" prepend="A subrequest is ">subrequest</GlossaryTooltip> in a redirect chain counts against the subrequest limit. This means that if a subrequest was redirected it would count as two subrequests. To avoid issues, ensure that you make a subrequest to the end location of the redirect chain.
46-
:::
4749

4850
## Limits
4951

0 commit comments

Comments
 (0)