Does anyone know how to stop Knockout HTML templates from being cached (for dev purposes)? I don't have this issue with any other files (CSS, PHTML, XML, JS), it only happens with HTML templates.
As an example I will add the word test to the checkout button in the minicart. The file already exists, the only change I'm making is to add the word test.
<!-- ko i18n: 'Go to Checkout TEST' --><!-- /ko -->
These are the steps I usually have to take to display my changes:
- Clear Magento cache (
php bin/magento c:f)
- Clear browser cache
- Clear browser cache again
The change is now visible. This time I got lucky, sometimes it requires more cache clears and other times I give up and delete the caches,
My questions are:
What causes this?
Why does it only affect HTML files?
Is there a workaround?