# Is it possible to start a response before action is fully executed?

**URL:** <https://www.ruby-forum.com/t/is-it-possible-to-start-a-response-before-action-is-fully-executed/117840>\
**Category:** Rails\
**Created:** [October 21, 2007, 11:48am UTC](https://www.ruby-forum.com/t/is-it-possible-to-start-a-response-before-action-is-fully-executed/117840 "2007-10-21T11:48:19Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [October 21, 2007, 11:48am UTC](https://www.ruby-forum.com/t/is-it-possible-to-start-a-response-before-action-is-fully-executed/117840/1 "2007-10-21T11:48:19Z")

</div>

Hello Rails experts:

I have a Facebook application that is suffering from the 8-second  
timeout issue in Facebook. The problem is that facebook takes a long  
time to respond to my api calls and in the meanwhile, my application  
keeps waiting for it and times out. The user, as a result, sees the  
infamous “try again” button and error.

What I am wondering is this:

Is there a way to start sending a response to the http request (like,  
for example, just send the html and head tags, and maybe a short body  
showing just “loading” or something) and then execute the action  
(while the user waits in the browser), and then complete the response  
after the action is fully executed?

I think if this were possible, this would solve my Facebook timeout  
problem.

Your help is much appreciated.  
Regards,

- Anand

Developer of

> **[Log into Facebook](https://apps.facebook.com/fbooktestthree/)**
>
> Log into Facebook to start sharing and connecting with your friends, family, and people you know.
