Browser Cache Causes Broken UI on Page Reload #2142
Answered
by
YuriiMotov
mohamedachrefhacheni
asked this question in
Questions
Privileged issue
Issue ContentWhen reopening the FastAPI dashboard, some users see outdated or broken UI components.This occurs due to the browser serving cached assets instead of fetching fresh ones from the server. Hard-refreshing (Ctrl+F5) temporarily fixes the issue, but a permanent solution is needed. |
Answered by
YuriiMotov
Aug 28, 2025
Replies: 3 comments
|
Just some wild guesses here, this sounds more like a caching issue in swagger-ui or possible a configuration think in traefik? |
0 replies
This comment was marked as spam.
This comment was marked as spam.
|
I suppose that's because Can you please try the following nginx config? frontend/nginx.conf Don't forget to rebuild the frontend container |
0 replies
Answer selected by
tiangolo
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I suppose that's because
index.htmlis being cached.To solve this we need to set separate cache strategies for index.html (no-cache) and static assets (long time cache since they have content hashes in the file names).
Can you please try the following nginx config?
frontend/nginx.conf
Don't forget to rebuild …