Nonce caching/generation on edge proxies or CDNs
Maintainers usually reply within 1 day
@hamishwillee is already working on this.
Since May 7, 2026.
Assessment
This issue has not been assessed yet.
Description
MDN URL
https://developer.mozilla.org/en-US/docs/Web/HTTP/Guides/CSP
What specific section or headline is this issue about?
Nonce caching
What information was incorrect, unhelpful, or incomplete?
Hi there 👋 , it's the Django community again :)
CSP 3 states that the nonce MUST be random on each transmission.
This is reflected in the docs here: https://github.com/mdn/content/blob/3b8fdeeaa5b96796870166b989de523261e5fc05/files/en-us/web/http/guides/csp/index.md?plain=1#L184
However, in relation to RFC 7234 caches, this would mean that proxies MUST not cache pages if a nonce-source expression is present in the policy.
What did you expect to see?
I'd love to see some clarification on how applications should or rather SHOULDN'T handle this.
The discussion was sparked as part of https://github.com/django/django/pull/21010#pullrequestreview-4235130467 and whether Django should set an additional explicit Cache-Control header.
My understanding of CSP is that this is NOT needed, as the standard is pretty clear on what a nonce needs to be.
Do you have any supporting links, references, or citations?
No response
Do you have anything more you want to share?
I don't believe this affects the security of browsers like FF, since client caching nonces is safe anyway. As nonce generation is limited to transmissions.
MDN metadata
Page report details
- Folder:
en-us/web/http/guides/csp - MDN URL: https://developer.mozilla.org/en-US/docs/Web/HTTP/Guides/CSP
- GitHub URL: https://github.com/mdn/content/blob/main/files/en-us/web/http/guides/csp/index.md
- Last commit: https://github.com/mdn/content/commit/6720d579bd658f02c56363805e97e69f93dc79f1
- Document last modified: 2026-03-22T23:36:38.000Z
- Dominant language
- Markdown
- Stars
- 11.2k
- Forks
- 23.3k
- Avg merge
- 2d 6h
- Merged PRs (30d)
- 173
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from mdn/content
-
Content:JS needs triage
Difficulty 1/5 Under an hour Newbie friendliness 88/100
Maintainers usually reply within 1 day
-
Literal matching: wrong resolver pathPossibly taken A pull request linked to this issue is open or already merged. OpenContent:JS good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
mdn/content#46630 · 1 comment ·
Maintainers usually reply within 1 day
-
Content:WebAPI needs info
Difficulty 1/5 1-3 hours Newbie friendliness 82/100
mdn/content#46626 · 2 comments ·
Maintainers usually reply within 1 day
-
cancel event not firing when reselecting previously selected fileMay be free again A pull request for this issue was closed without being merged. OpenContent:HTML
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
mdn/content#46622 · 1 comment ·
Maintainers usually reply within 1 day
-
Add the message_serialization manifest key page and update the data cloning algorithm sectionPossibly taken @xeenon claimed this 4 days ago. OpenContent:WebExt needs triage
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day