Class: WEBrick::HTTPServlet::AbstractServlet

Inherits:
Object
  • Object
show all
Defined in:
lib/zfben_hanoi/webrick.rb

Direct Known Subclasses

BasicServlet

Instance Method Summary collapse

Instance Method Details

#prevent_caching(res) ⇒ Object



39
40
41
42
43
44
45
# File 'lib/zfben_hanoi/webrick.rb', line 39

def prevent_caching(res)
  res['ETag'] = nil
  res['Last-Modified'] = Time.now + 100**4
  res['Cache-Control'] = 'no-store, no-cache, must-revalidate, post-check=0, pre-check=0'
  res['Pragma'] = 'no-cache'
  res['Expires'] = Time.now - 100**4
end