Proposal: Drop HTTP/1.0 support to fix caching issues
Background
We've discovered that default_cache_headers sets Pragma: no-cache for HTTP/1.0 compatibility, which breaks caching in the application. For example, if you set expires_in 1.minute it translates to Cache-Control: max-age=60, private, but if you also set Pragma: no-cache, browser just ignores it and still makes the request.
Proposal
In order to fix that you need to add skip_before_action :default_cache_headers for actions that change the Cache-Control header. The issue that it is easy to miss since this is an unexpected behavior, which also causes performance problems across the entire application. We have 6 controllers with skip_before_action :default_cache_headers, but quite a lot more of expires_in invocations.
Instead of trying to fix default_cache_headers I'd like to propose to drop HTTP/1.0 support completely, which includes removing this problematic before_action.
Context
HTTP/1.0 was introduced in 1996, and is currently marked as obsolete. Just for reference, HTTP/1.1 was introduced in 1997.
| Version | Year introduced | Current status |
|---|---|---|
| HTTP/1.0 | 1996 | Obsolete |
| HTTP/1.1 | 1997 | Standard |
| HTTP/2 | 2015 | Standard |