Wednesday, June 15, 2011

Re: [Rails] caching a page that was dynamically created ?

On 15 June 2011 23:13, Jedrin <jrubiando@gmail.com> wrote:
>
>  Say you have a page that you dynamically created with ajax calls and
> RJS. Can you somehow get a copy of what that final page looks like and
> somehow cache it away and later serve it from the cache ?
>
>  A problem seems to be that if you navigate away from a dynamic page
> and then hit the back browser button, you can then lose the dynamic
> content. I now you can have your own sort of back link, but I am
> wondering what other things might be possible. You also can't bookmark
> stuff that was dynamically created either.  Whatever strategy you
> employ effects the entire site, so that if you latter change it, you
> have to change alot of code ..

You could save in the session (or the database) the current state of
the page and then use that information to re-render the appropriate
data when asked for that page again.

Colin

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate