# Loading partial after page loads

**URL:** <https://www.ruby-forum.com/t/loading-partial-after-page-loads/169611>\
**Category:** Rails\
**Created:** [June 5, 2009, 10:27pm UTC](https://www.ruby-forum.com/t/loading-partial-after-page-loads/169611 "2009-06-05T22:27:42Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![scott](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/3e96dc/32.png) [@scott](https://www.ruby-forum.com/u/scott)\
**Post date:** [June 5, 2009, 10:27pm UTC](https://www.ruby-forum.com/t/loading-partial-after-page-loads/169611/1 "2009-06-05T22:27:42Z")

</div>

For performance reasons, I need to render a partial asyncronously  
(after the page loads). I’ve already isolated the code into a  
partial, but I haven’t figured out how to render it after the page  
loads. Do I have to fire off the onload event in raw javascript? Any  
ideas how to do this? It seems like a common problem, but I haven’t  
seen any solutions online for this.

Thanks,  
Scott

---

<div class="post-metadata">

**Author:** ![scott](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/3e96dc/32.png) [@scott](https://www.ruby-forum.com/u/scott)\
**Post date:** [June 5, 2009, 10:36pm UTC](https://www.ruby-forum.com/t/loading-partial-after-page-loads/169611/2 "2009-06-05T22:36:13Z")

</div>

Yeah, you could do it with ajax and onload

maybe this is what you are looking for?

[http://railsforum.com/viewtopic.php?id=30266](http://railsforum.com/viewtopic.php?id=30266)

Scott wrote:

> For performance reasons, I need to render a partial asyncronously  
> (after the page loads). I’ve already isolated the code into a  
> partial, but I haven’t figured out how to render it after the page  
> loads. Do I have to fire off the onload event in raw javascript? Any  
> ideas how to do this? It seems like a common problem, but I haven’t  
> seen any solutions online for this.
> 
> Thanks,  
> Scott
