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

Use Cache-Control max-age instead of Expires header #20

Merged
merged 1 commit into from
Jul 14, 2016

Conversation

teohhanhui
Copy link
Contributor

No description provided.

@teohhanhui
Copy link
Contributor Author

Try to fix jimmynicol/image-resizer#27

@teohhanhui teohhanhui merged commit 6a4cac3 into tripviss:master Jul 14, 2016
@stevenscg
Copy link

@teohhanhui Did you look at possibly leaving the Vary header in place?

gzip vs non-gzip requests, for example, could be an issue as described here:
https://www.fastly.com/blog/best-practices-for-using-the-vary-header:

The bigger problem is when the first request for an object comes from a browser that does do compression, and we end up with the compressed version in our cache. Now, when a browser comes along that doesn't understand compression, it gets the compressed version and has no idea what to do other than display gibberish.

@teohhanhui
Copy link
Contributor Author

teohhanhui commented Jul 20, 2016

@stevenscg Adding Vary: Accept-Encoding is the responsibility of whatever is handling the compression. For example, nginx and Varnish already correctly sets that header when compression is enabled. If you're doing the compression in your node app, please be sure to set that header yourself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants