Hi All,
We're currently on v20 and have been for about two months. We create html forms for our providers and have noticed that when we update an html form, the form no longer updates without having us clearing the html cache and logging out and back in. This seems to be something EVERY provider needs to do before they can see the updated html form.
Has anyone else experienced this and does anyone have any advice on how to prevent this workflow and make the form automatically update like it did pre-v20?
Thanks!
Emily
This has nothing to do with the version, but with the fact that HTML may cache by default.
Use:
<meta http-equiv="PRAGMA" content="NO-CACHE" />
<meta http-equiv="CACHE-CONTROL" content="NO-CACHE" />
See example in:
https://github.com/mdObject/GECentricity/blob/V2.0/mdObjectAngularDemo/src/index.html
I haven't tried this in v20 yet as we're just preparing to migrate over right now, but v20 uses Chromium for the browser and it's notorious for caching no matter what you do.
You can try adding no-cache metadata as suggested but my research indicates you may need to change caching settings on the web server side of things. I don't know yet how to do that with JBoss.
CPS/APS did not cache HTML prior to v19 I believe.
Our HTML files include the following but still get cached. I would be interested if anyone has been able to edit the HTTP headers to control caching.
<meta http-equiv="Cache-Control" content="no-store" />
<meta http-equiv="Pragma" content="no-cache" />
<meta http-equiv="Expires" content="0" />
It's hard to say what is wrong without seeing your code/html. However, if this is a SPA, you may want to look how your script declared.
For example, without --prod flag, your script tag may looks like:
<script src="main.js">
If you turn on the optimization with "subresourceIntegrity" flag, the compiler will create something like this:
<script src="main.21149767d6bc07f124bb.js" crossorigin="anonymous" defer integrity="sha384-muGgOPNmT4Q8nFL2IGg81tgeG1XCUVqfIWPPQ6lL5XvDOfUoTU73lJv+EXLpXnQ0">
You may see that the main js file renamed to something that may be cashed, but the next one will override it.