The first attempt to add the caching directive (Cache-Control: no-cache) to the response of any HTTP request that fetches index.html.
The below solution (which is not fully working) added the following in the WEB-INF/web.xml of the WAR file containing the static front-end files:
=======================================================================
enter image description here
In our production servers, the WAR file that contains the static files is called ROOT. war, so that our JBoss web server would serve it at the root (e.g. https://xxx.xxx.com).
The index.html is served either via explicitly specified /index.html, or just root "/".
The issue is that currently, the cache directive header is not output when serving at root (“/"), possibly because the rule would just match /XXXXX (e.g. /genesis) as opposed to root "/" (but this is just a theory and needs to be proven). So we still don’t have a solution yet that would output the cache directive header for HTTP requests that would fetch index.html.
I have to find a solution, so that the response for a request that would fetch index.html would output the caching directive header no-cache (either by extending the same approach as currently used, or by devising a completely new approach).