- The dynamic HTML should never be cache
Should be changed to
Important Note: Basic idea is you should somehow change the URL of the resource in your HTML and that will force browser to make a new request for the resource.
You have a new version of test.js at same location and you want to force browser to download new version in that case change reference to test.js in HTML like this
Browser will make a new request to the HTTP server and on the HTTP server you can create a URL rewrite rule like this
RewriteRule /resource/v([0-9]+)/(.*) /$2
What this rule will do is it will take the incoming request /resource/v1/test.js and rewrite it to /resource/test.js and which will return a new copy of the test.js to browser