We experience an issue almost every single time we deploy new code to the website, whereby we get 404 errors for merged CSS/JS files. To me, this seems like there is something pointing to the location of the old file, which no longer exists.
Please see this for an example of how a page loads:
The weird thing about this issue, is that it only affects some people, or sometimes it affects you but when you refresh it's fixed. I've tried clearing local cache and this has not made a difference.
Our process during deployment is:
- Maintenance mode enabled
- Varnish restart
- Setup upgrade
- Setup DI compile
- Setup static content deploy
- Magento cache flush
- Purge CloudFlare cache
As you can see, we are taking steps to ensure that the cache is cleared and it should be pulling the new files no problem, but the issue still exists.
This is affecting customer experience and sometimes is preventing the cart/checkout from working due to there being no JS on the page, so this is a huge priority for us to fix.
Any help or thoughts would be greatly appreciated!
