-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Make sure that Metabase JS/CSS isn't cached by browser #2210
Comments
A normal refresh didn't do it? |
nope. had to be a hard refresh. |
FWIW we don't actually know if it was the |
Correct. I filed this because we saw a user run into this problem and a refresh was the solution, but we don't know the exact cause. |
I think @tlrobinson is right about the JS / CSS being the issue here. The cache-busting headers are only added to
|
The cache busting for the JS/CSS should be happening due to the fact that we append a randomized hash on those urls right? In any case, given that we've seen several folks run into this since deploying 0.16.0 can we address this somehow before the release goes out? |
@agilliland correct, JS and CSS files should be aggressively cached, then "cache busted" by changing the hash in the query string when re-built. AFAIK Webpack is doing this correctly, so I'm pretty stumped why this is happening. I'll keep poking at it. |
I don't think the randomized hash is working correctly. I'm looking at the network inspector and when I soft reload a page it fetches |
Why can't we just add cache-prevention headers to the JS and CSS files and skip this random hash stuff? |
Because we have like 2MB of JS/CSS that we don't want to reload every time unless it actually changes. This is a pretty common practice. |
Ok so I'm pretty sure I figured it out... it wasn't index.html, css, or js being cached, it was... One of the last few Angular HTML partials, hooray! Changing the headers for partials won't fix this for people who already have the partial cached. A couple options:
|
I'm fine with taking the easy approach here and calling it done. The real fix can come when we move this stuff over to redux and don't have any other external templates to load. |
Seen a couple reports of cases where the app was updated and the index.html page served by the metabase frontend had changed, but the user's browser was continuing to use an older version of the page until a hard page refresh was done.
The text was updated successfully, but these errors were encountered: