Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VERSION_D.html is cached - you must go into incognito #577

Open
milanmajchrak opened this issue Apr 8, 2024 · 6 comments
Open

VERSION_D.html is cached - you must go into incognito #577

milanmajchrak opened this issue Apr 8, 2024 · 6 comments

Comments

@milanmajchrak
Copy link
Collaborator

No description provided.

@MajoBerger
Copy link

There are several problems interacting with this issue. One or several of those actions can help:

  • Refresh with Ctrl + Shift + R
  • login/logout
  • use incognito mode
  • switch language to English (or to another language and then back to English)
  • wait 10 sec for (anonymous) cache to be dropped and try all of the above again

The problem is, of course, we never know if we see the newest version or not.
One way would be to mount the file from docker to host and then to statically serve it through e.g. angular.

@MajoBerger
Copy link

This is a problem for all of static files and possibly for several anonymous pages. I have absolutely no idea what to do about it and seems to be a FE problem.

@MajoBerger
Copy link

investigate more with languages

@MajoBerger MajoBerger reopened this Apr 10, 2024
@MajoBerger
Copy link

TL;DR: To be absolutely sure, use dev tools (F12), check disable cache, and reload.

VERSION_D.html file (not necessarily the whole page) is cached.
it is NOT cached in insecure https version - chromium based browsers never cache that.
If Ctrl + Shift + R is pressed, the file is requested from the server and not loaded from cache,
WITH ONE EXCEPTION. If language is different, e.g. czech, the server first goes to
static/cs/VERSION_D.html which does not exist, so of course it receives 404, and then goes
to static/VERSION_D.html but takes that from cache DESPITE USING Ctrl + Shift + R.
Baffling, but that's what's happening. Using dev tools and checking disable cache works
every time, because no requests are loaded from cache and all are read from server.

When using the original language (in our case english, but I am not sure if that is always
the case or can be configured), Ctrl + Shift + R works well and receives the newest version.

Of course, all this can be delayed by 10 seconds (configurable), since frontend server has caching enabled
and user can receive this cached version. This should only be true when not logged in - for anonymous users.
For those that are logged in, there should be no caching on the server side (but above paragraphs still apply!
This is different caching to the one discussed above!!!!)

@MajoBerger
Copy link

check how others solve caching of CICD apps

@MajoBerger
Copy link

when changing versions, files are usually changing names, so cache works as expected. Another solution is to change url by adding parameter that changes, therefore preventing caching.

Adding header is said to be unreliable for cache busting purposes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants