# Modifying title of browser window when rendering a file

**URL:** <https://www.ruby-forum.com/t/modifying-title-of-browser-window-when-rendering-a-file/89073>\
**Category:** Rails\
**Created:** [March 16, 2007, 10:31pm UTC](https://www.ruby-forum.com/t/modifying-title-of-browser-window-when-rendering-a-file/89073 "2007-03-16T22:31:35Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![weyus](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/7ab992/32.png) [@weyus](https://www.ruby-forum.com/u/weyus)\
**Post date:** [March 16, 2007, 10:31pm UTC](https://www.ruby-forum.com/t/modifying-title-of-browser-window-when-rendering-a-file/89073/1 "2007-03-16T22:31:35Z")

</div>

All,

I am using this to render a file to a browser window (a popup) -

send\_file(‘xyz’, :type =\> ‘application/pdf’, :disposition =\> ‘inline’)

By default, the window’s title bar shows the host and the name of the  
controller action (in FF) or the entire URL (in IE).

Does anyone know of a way to modify the content of the title bar in a  
window if it is rendering a file? The only way that I know to modify  
the title is to manipulate the HTML element. But I’m not  
rendering HTML, I’m rendering a PDF.

Thanks,  
Wes
