# Modify headers

**URL:** <https://www.ruby-forum.com/t/modify-headers/95209>\
**Category:** Rails\
**Created:** [December 5, 2005, 12:42pm UTC](https://www.ruby-forum.com/t/modify-headers/95209 "2005-12-05T12:42:59Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![stakadush](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/3be4f8/32.png) [@stakadush](https://www.ruby-forum.com/u/stakadush)\
**Post date:** [December 5, 2005, 12:42pm UTC](https://www.ruby-forum.com/t/modify-headers/95209/1 "2005-12-05T12:42:59Z")

</div>

how can i modify the headers sent to the browser?  
i have tried using response.headers but it generates a server error. i  
tried also just doing headers[]= but got an error also. i saw somewhere  
saying to do @response.headers.  
so i am a bit confused now…3 different approchases, and non worked 🙂

i’d like to do: response.headers[‘expire’] = 0

where should i put this? i’d like this to be for the entire application,  
so my first thought was application.rb under controllers.

thanks…
