Chat index.html is cached

When a new version of ORIGAM is deployed, index.html of the chat application seems to be cached. This prevents a proper update and the user has to delete browser cache. This is unwanted, the index file should not be cached.

I suggested today at the mesting that the problem might be solved by adding a <meta> tag to the html.index. However it looks like the <meta> tag data will be overriden by whatever is in the http header. So this is not a good idea.

The problem should be solved on the server level. We are not modifying the headers the ASP net is sending. This should result in the default behavior. Which is client caching the static files and asking the server whether they have changed every time. The server then retuns 304 meaning no changes or 200 with the new file. I have confirmed that it wors like that on Kestrel:

Can you confirm this behavior in your setup?

Usually we have some front facing server (IIS on standalone installs and nginx in Docker). @JiriPrajz can you please test the behaviour @jsusen suggested? That means: Does IIS/nginx respond correctly when index.html changes (both chat and main client)?

I can confirm that a browser directly recieve index.html from cache when you click on chat menu item to open chat room. The browser use cache too when i change index.html in same scenario . But when i click on refresh button in chat room then the browser send request on server and ask for index.html.
The solution is add into request from chat menu header “if-Modified-since” .

So this seems ok. The index.html will not be red from the cache when refreshing the browser right?

But it is read from the cache when clicked on from the client.

Yes. When you click on the menu item to open chat, index.html is read from the cache. Is this a problem? When you make changes in the model they won’t be immediatelly reflected in the browser either.

The problem is that when a customer makes an upgrade, the user gets the old index.html so chat wouldn’t start unless he refreshes the screen or clears a browser cache. This is not a good upgrade behaviour.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.