Method: WEBrick::HTTPServlet::AbstractServlet#prevent_caching

Defined in:
lib/newjs/jstest.rb

#prevent_caching(res) ⇒ Object



203
204
205
206
207
208
209
# File 'lib/newjs/jstest.rb', line 203

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