Closed
Conversation
Contributor
💚 Build SucceededTo update your PR or re-run it, just comment with: |
Member
Author
|
Feel free to close this PR if you feel like this is not the way to go. Since I was playing around with the properties, I decided it would be good not to lose this in case we wanted to apply it. |
Contributor
|
Pinging @elastic/kibana-operations (Team:Operations) |
Contributor
|
awesome! it's not not the way to go, you're certainly right about the round trip. @restrry opened another approach here if you have any thoughts and want to weigh in. @restrry if you get a chance can you triage this? adding the platform label too. |
Contributor
|
Pinging @elastic/kibana-platform (Team:Platform) |
Contributor
Contributor
|
yes. #64414 is aimed to solve the same problem. |
Member
Author
|
Thanks for confirming! Closing this PR then. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Our Cache policy for serving JS and CSS bundled assets is
"must-revalidate", enforcing every request to actually reach the Kibana server to revalidate the theetagvia theIf-None-Matchheader.This makes Kibana super slow under connections with a high latency. It is easy to check with the network throttling the Dev Tools: In Chrome, if you set it to limit the network speed to

Slow 3G, you can tell that, even when all the requests receive a304response, it takes MINUTES!! to load all the resources in the Home application:Mind the timings in the bottom of the screenshot
I tested locally changing the cache policy to

cache-control: max-age=30; must-revalidate(allow the browser to use the local files if they were validating less than 30s ago). With this, if I refresh the page before those 30s expire, the load time (with the throttling still on) is highly reduced:Maybe we want to mark the assets as stale as soon as they are served but allow the browsers to use them to load the pages as quick as possible while revalidating and downloading in the background. This PR adds a combination of
stale-while-revalidatewithmax-ageandmust-revalidate?Checklist
Delete any items that are not applicable to this PR.
For maintainers