Skip to content

Enable caching for content per Google PageSpeed Insights recommendation#15218

Merged
jboxman merged 1 commit intoopenshift:masterfrom
jboxman-rh:enable-httpd-cache-control
Oct 17, 2019
Merged

Enable caching for content per Google PageSpeed Insights recommendation#15218
jboxman merged 1 commit intoopenshift:masterfrom
jboxman-rh:enable-httpd-cache-control

Conversation

@jboxman
Copy link
Contributor

@jboxman jboxman commented Jun 5, 2019

So I've been thinking about this for a few months now. Currently, we don't provide an Expires header. An optimal strategy will require additional research and discussion, but I wanted to open this now anyway.

$ curl -I https://docs.openshift.com/

HTTP/1.1 200 OK
Date: Wed, 05 Jun 2019 18:17:01 GMT
Server: Apache/2.4.34 (Red Hat) OpenSSL/1.0.2k-fips
Last-Modified: Wed, 05 Jun 2019 14:41:49 GMT
ETag: "3c62-58a9498ecc540"
Accept-Ranges: bytes
Content-Length: 15458
Vary: Accept-Encoding
X-UA-Compatible: IE=Edge,chrome=1
Content-Type: text/html; charset=utf-8
Set-Cookie: 0831e0291a1cfb29457385c56afd1928=897d79a9d7e69f42f5e4e045077169e5; path=/; HttpOnly; Secure
Cache-control: private

@jboxman jboxman self-assigned this Jun 5, 2019
@openshift-ci-robot openshift-ci-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Jun 5, 2019
@vikram-redhat
Copy link
Contributor

This is great. Yes, we should do this. The only thing I would remove is text/html for which we should not have any caching (due to fires which require immediate updates.)

@vikram-redhat
Copy link
Contributor

Also poor vikram-raj is probably not sure why he got tagged :)

@jboxman
Copy link
Contributor Author

jboxman commented Jun 6, 2019

@vikram-redhat I blame auto-complete :)

@jboxman
Copy link
Contributor Author

jboxman commented Aug 12, 2019

@vikram-redhat if Apache is going away, I need to reformulate this.

@vikram-redhat
Copy link
Contributor

@jboxman yes this will need to change. I can't recall why we didn't merge it already though?

@jboxman
Copy link
Contributor Author

jboxman commented Aug 13, 2019

@vikram-redhat, you wanted it to leave the behavior for caching HTML pages alone so users receive updates as soon as possible.

@vikram-redhat
Copy link
Contributor

@jboxman correct, so it just means we take the text/html part out and then merge the rest.

@jboxman
Copy link
Contributor Author

jboxman commented Aug 13, 2019

@vikram-redhat, true.

@jboxman jboxman force-pushed the enable-httpd-cache-control branch from 9fa2e95 to e1c4b36 Compare August 13, 2019 11:45
@jboxman
Copy link
Contributor Author

jboxman commented Oct 16, 2019

@vikram-redhat, did we ever move to Nginx?

@vikram-redhat
Copy link
Contributor

@jboxman no we didn't :) Merge away.

@jboxman jboxman merged commit fffb1a8 into openshift:master Oct 17, 2019
@jboxman jboxman deleted the enable-httpd-cache-control branch October 17, 2019 12:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants