Skip to content

Commit

Permalink
Document the headers added to prevent caching in IE(9)
Browse files Browse the repository at this point in the history
  • Loading branch information
bjoerge committed May 16, 2013
1 parent 08cabad commit e6d8a88
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions api/v1.rb
Expand Up @@ -14,8 +14,13 @@ class KuduV1 < Sinatra::Base

before do
response.headers['Cache-Control'] = 'public, max-age=300'

# If this service, for some reason lives behind a proxy that rewrites the Cache-Control headers into
# "must-revalidate" (which IE9, and possibly other IEs, does not respect), these two headers should properly prevent
# caching in IE (see http://support.microsoft.com/kb/234067)
headers 'Pragma' => 'no-cache'
headers 'Expires' => '-1'

cache_control :private, :no_cache, :no_store, :must_revalidate
end

Expand Down

0 comments on commit e6d8a88

Please sign in to comment.