# Ajax vs. Page Refresh

**URL:** <https://www.ruby-forum.com/t/ajax-vs-page-refresh/176182>\
**Category:** Rails\
**Created:** [September 25, 2009, 10:02pm UTC](https://www.ruby-forum.com/t/ajax-vs-page-refresh/176182 "2009-09-25T22:02:34Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![nozavroni](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/f17d59/32.png) [@nozavroni](https://www.ruby-forum.com/u/nozavroni)\
**Post date:** [September 25, 2009, 10:02pm UTC](https://www.ruby-forum.com/t/ajax-vs-page-refresh/176182/1 "2009-09-25T22:02:34Z")

</div>

More of an opinion / discussion piece.

When passing a lot of data, either via ajax, or simply refreshing the  
page and getting a lot of data back, is it better from a “amount of work  
placed on the server” perspective to do a full page refresh or to do an  
ajax refresh of parts of the page, data intensive or no? Thoughts?

---

<div class="post-metadata">

**Author:** ![nozavroni](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/f17d59/32.png) [@nozavroni](https://www.ruby-forum.com/u/nozavroni)\
**Post date:** [September 27, 2009, 7:37pm UTC](https://www.ruby-forum.com/t/ajax-vs-page-refresh/176182/2 "2009-09-27T19:37:10Z")

</div>

> More of an opinion / discussion piece.
> 
> When passing a lot of data, either via ajax, or simply refreshing the  
> page and getting a lot of data back, is it better from a “amount of  
> work  
> placed on the server” perspective to do a full page refresh or to do  
> an  
> ajax refresh of parts of the page, data intensive or no? Thoughts?

Depends on how much data you are changing overall. If you’ve got a  
pretty bare bones page with a lot of content (by which I mean actual  
content, not side bars and stuff) and you’re replacing the entire  
thing it doesn’t matter which way you go.

Now, if your page has a really complicated sidebar that once loaded  
never changes, but takes a lot of time/resources to load the first  
time, and your content isn’t that much, then maybe ajax is a better  
way to go.

Don’t forget to consider web spiders though and the ability to  
bookmark that page, and folks for which ajax won’t work, etc…

My personal take on it is… if by using ajax the user experience is  
much much better I’ll use it. Otherwise it’s not worth it.

-philip
