# Page with download

**URL:** <https://www.ruby-forum.com/t/page-with-download/160996>\
**Category:** Rails\
**Created:** [February 21, 2009, 11:32pm UTC](https://www.ruby-forum.com/t/page-with-download/160996 "2009-02-21T23:32:36Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![pedz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/839c29/32.png) [@pedz](https://www.ruby-forum.com/u/pedz)\
**Post date:** [February 21, 2009, 11:32pm UTC](https://www.ruby-forum.com/t/page-with-download/160996/1 "2009-02-21T23:32:36Z")

</div>

I want to have a single link that displays a page and also starts a  
download. Is that possible?

---

<div class="post-metadata">

**Author:** ![pedz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/839c29/32.png) [@pedz](https://www.ruby-forum.com/u/pedz)\
**Post date:** [February 22, 2009, 12:51am UTC](https://www.ruby-forum.com/t/page-with-download/160996/2 "2009-02-22T00:51:21Z")

</div>

On 21 Feb 2009, at 22:32, Perry S. wrote:

> I want to have a single link that displays a page and also starts a  
> download. Is that possible?

not quite - for a single http request there will be a single response:  
either an html page, or a file (or a redirect etc…).

You could serve a page which after a few second redirected to the  
download url.

Fred
