Closed
Description
Preconditions (*)
- Apache 2.4 + php 7.2
- Magento 2.3.3 or 2.3-develop
- Magento mode: default, developer OR production with enabled SCD on demand and without running static content deploy
This issue isn't reproducing in production mode with compiled static content and not reproducing with nginx+php_fpm.
Steps to reproduce (*)
Case 1:
- Open Google Chrome developer tools
- Navigate to homepage
- In Google Chrome dev tools looks at any .js file (I checked on domReady.js file), look at "Response Headers" section
- Refresh the page, find the same JS file, looks at "Response Headers"
Case 2:
Try to curl some js file from Magento/blank two times(because you never request it before):
Expected result (*)
- First time file should contains Cache-Control header
- Second time should also contains Cache-Control header
Actual result (*)
Additional info
In case if we'll have CDN - first response will be cached for many people and browser will not cache JS files in browser's cache. Also there are another headers missing (see screenshots) that could create incorrect behavior.
This issue caused by redirecting to static.php file when real .js file doesn't exists, and adding Cache-Control header isn't applying.
Lines 75 to 77 in dfffe34
Metadata
Metadata
Assignees
Labels
Gate 2 Passed. Manual verification of the issue description passedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedGate 1 Passed. Automatic verification of issue format passedGate 4. Acknowledged. Issue is added to backlog and ready for developmentMay be fixed according to the position in the backlog.The issue has been reproduced on latest 2.3 releaseAffects non-critical data or functionality and does not force users to employ a workaround.
Type
Projects
Status
Done