Skip to content

Commit cf1eeb5

Browse files
committed
Add caching example
1 parent a9fb444 commit cf1eeb5

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

src/content/docs/workers/static-assets/direct-upload.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ sequenceDiagram
3838
User<<->>Workers API: Upload script version<br/>PUT /client/v4/accounts/:accountId/workers/scripts/:scriptName
3939
```
4040
</TabItem>
41-
<TabItem icon="cloudflare-for-platforms" label="Workers for Platforms" IconComponent={Icon}>
41+
<TabItem icon="cloudflare-for-platforms" label="Workers for Platforms">
4242
```mermaid
4343
sequenceDiagram
4444
participant User

src/content/partials/workers/custom_headers.mdx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,15 @@ For example, to prevent your <code>{props.product === 'workers' ? '\*.workers.de
128128
}
129129
/>
130130

131+
##### Configure custom browser cache behavior
132+
133+
If you have a folder of fingerprinted assets (assets which have a hash in their filename), you can configure more aggressive caching behavior in the browser to improve performance for repeat visitors:
134+
135+
```txt
136+
/static/*
137+
Cache-Control: public, max-age=31556952, immutable
138+
```
139+
131140
##### Harden security for an application
132141

133142
:::caution

0 commit comments

Comments
 (0)