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

Remove http_cache_forever's version parameter #24072

Merged

Conversation

byroot
Copy link
Member

@byroot byroot commented Mar 5, 2016

Ref: #18394

Summary

After a discussion with @jeremy and @rafaelfranca it seems we agree that the version parameter doesn't serve a real purpose and might actually mislead developers into thinking they can wipe the cache by bumping the version.

Context

Since expires_in 100.years sets a Cache-Control: max-age=3155760000 response header, browsers and / or proxy won't revalidate the resource back to the server unless they do a force-reload (Cache-Control: max-age=0 request header). In which case the browser will receive the changed resource wether or not the ETag changed.

If developers wish to wipe such cache, they will have to change the resource URL with a query parameter or similar.

cc @arthurnn

rafaelfranca added a commit that referenced this pull request Mar 5, 2016
Remove http_cache_forever's version parameter
@rafaelfranca rafaelfranca merged commit 2fcd57b into rails:master Mar 5, 2016
@arthurnn
Copy link
Member

arthurnn commented Mar 7, 2016

👍

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

Successfully merging this pull request may close these issues.

4 participants