Actions
Bug #106564
closedGenerated importmaps are not cacheable in frontend
Status:
Resolved
Priority:
Should have
Assignee:
-
Category:
Caching
Target version:
Start date:
2025-04-12
Due date:
% Done:
100%
Estimated time:
TYPO3 Version:
13
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:
Description
When loading a JavaScript module in frontend context, a importmap is rendered with a nonce, preventing the page from being cached:
<f:asset.module identifier="bootstrap"/>
Output with nonce:
<script type="importmap" nonce="gy9PpoqTXQ3FJUK3zMFNc5iqqh7qaM6MIwujT0A7bgdjgKwHiX2dKw">{"imports":{"@typo3/core/":"/typo3/sysext/core/Resources/Public/JavaScript/"…}}</script>
<script type="module" async="async" src="/typo3/sysext/core/Resources/Public/JavaScript/Contrib/bootstrap.js?bust=79ea92c419e74329bd1e25b52201a0586f94c1a5"></script>
Expected Output without a nonce (but sha256 in CSP header):
<script type="importmap">{"imports":{"@typo3/core/":"/typo3/sysext/core/Resources/Public/JavaScript/"…}}</script>
<script type="module" async="async" src="/typo3/sysext/core/Resources/Public/JavaScript/Contrib/bootstrap.js?bust=79ea92c419e74329bd1e25b52201a0586f94c1a5"></script>
Updated by Gerrit Code Review 15 days ago
- Status changed from New to Under Review
Patch set 6 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/80200
Updated by Gerrit Code Review 12 days ago
Patch set 1 for branch 13.4 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/89142
Updated by Benjamin Franzke 12 days ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 01ce663d84cda6e9d0ef9dd6e45cbd039afc37fd.
Actions