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

[6.x] [optimizer] allow http caching for bundles (#15880) #15933

Merged
merged 1 commit into from
Jan 9, 2018

Conversation

epixa
Copy link
Contributor

@epixa epixa commented Jan 9, 2018

Backports the following commits to 6.x:

By setting cache-control to must-revalidate, we indicate to the browser
that it should send the if-none-match header with the last known etag
value. If the etags match, the server responds with a 304 and no body,
and if they don't the server responds with a 200 and a body along with a
new etag.

This ensures a cache is always invalidated when a bundle changes, like
when Kibana is upgraded or a plugin is installed.

We no longer send the last-modified header because we don't want the
browser caching based on time. Doing so can be unpredictable since the
browser may not agree with the server's definitions of DST, and the
server time itself can be changed.
@epixa epixa added the backport label Jan 9, 2018
@epixa epixa merged commit 59726c0 into elastic:6.x Jan 9, 2018
@epixa epixa deleted the backport/6.x/pr-15880 branch January 9, 2018 18:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant