bornboulder77-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
2007-May-31 20:32 UTC
[RoR Spinoffs] [Newb] How I lazy load large elements?
People, I''m a bit new to web technology. I''ve worked through the AWR book and looked at a variety of RJS demos online. Suppose I have a splash page which has a variety of slow loading elements. Would it be possible to defer loading of them? I''d like to get the important parts of the page loaded first so the user see''s something quickly. Then once they are loaded, I''d like to load the less important elements. I tried a few experiments with the JS onload() function but I''m not quite getting it. Help anyone? Thanks, Bob --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
Tom Gregory
2007-May-31 21:34 UTC
Re: [RoR Spinoffs] [Newb] How I lazy load large elements?
Use the "Net" feature of the Firebug extension in Firefox. Which files are coming in slowly? That''s where you should start. http://www.getfirebug.com/ TAG On May 31, 2007, at 2:32 PM, bornboulder77-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org wrote:> > People, > > I''m a bit new to web technology. > I''ve worked through the AWR book and looked at a variety of RJS demos > online. > > Suppose I have a splash page which has a variety of slow loading > elements. > > Would it be possible to defer loading of them? > > I''d like to get the important parts of the page loaded first so the > user see''s something quickly. > > Then once they are loaded, I''d like to load the less important > elements. > > I tried a few experiments with the JS onload() function but I''m not > quite getting it. > > Help anyone? > > Thanks, > Bob > > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
bornboulder77-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
2007-May-31 21:55 UTC
Re: [RoR Spinoffs] [Newb] How I lazy load large elements?
Tom, I like your answer. I need to step back and find out what is loading slowly. I''ll learn about Firebug. About lazy-loading... I found something which will give me a good start. The data I want to lazy-load is here: /scaff/categs/list_all2 I want to put it here: p id="r2c1categs" This gets the job done: <body onload="new Ajax.Updater(''r2c1categs'', ''/scaff/categs/ list_all2'')" > I was having problems because onload() is ignored if I put it in the wrong kind of tag. body tag works good tho! -Bob On May 31, 2:34 pm, Tom Gregory <t...-PGZyUNKar/Q@public.gmane.org> wrote:> Use the "Net" feature of the Firebug extension in Firefox. Which > files are coming in slowly? That''s where you should start. > > http://www.getfirebug.com/ > > TAG > > On May 31, 2007, at 2:32 PM, bornboulde...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org wrote: > > > > > People, > > > I''m a bit new to web technology. > > I''ve worked through the AWR book and looked at a variety of RJS demos > > online. > > > Suppose I have a splash page which has a variety of slow loading > > elements. > > > Would it be possible to defer loading of them? > > > I''d like to get the important parts of the page loaded first so the > > user see''s something quickly. > > > Then once they are loaded, I''d like to load the less important > > elements. > > > I tried a few experiments with the JS onload() function but I''m not > > quite getting it. > > > Help anyone? > > > Thanks, > > Bob--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
Jesse Farmer
2007-May-31 22:26 UTC
Re: [RoR Spinoffs] [Newb] How I lazy load large elements?
You can do something like Event.observe(window, ''load'', function() { // Stuff to do once page is done loading }); On 5/31/07, bornboulder77-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org <bornboulder77-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > Tom, > > I like your answer. > > I need to step back and find out what is loading slowly. > I''ll learn about Firebug. > > About lazy-loading... > I found something which will give me a good start. > > The data I want to lazy-load is here: > > /scaff/categs/list_all2 > > I want to put it here: > > p id="r2c1categs" > > This gets the job done: > <body onload="new Ajax.Updater(''r2c1categs'', ''/scaff/categs/ > list_all2'')" > > > I was having problems because onload() is ignored if I put it > in the wrong kind of tag. > > body tag works good tho! > > -Bob > > > On May 31, 2:34 pm, Tom Gregory <t...-PGZyUNKar/Q@public.gmane.org> wrote: > > Use the "Net" feature of the Firebug extension in Firefox. Which > > files are coming in slowly? That''s where you should start. > > > > http://www.getfirebug.com/ > > > > TAG > > > > On May 31, 2007, at 2:32 PM, bornboulde...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org wrote: > > > > > > > > > People, > > > > > I''m a bit new to web technology. > > > I''ve worked through the AWR book and looked at a variety of RJS demos > > > online. > > > > > Suppose I have a splash page which has a variety of slow loading > > > elements. > > > > > Would it be possible to defer loading of them? > > > > > I''d like to get the important parts of the page loaded first so the > > > user see''s something quickly. > > > > > Then once they are loaded, I''d like to load the less important > > > elements. > > > > > I tried a few experiments with the JS onload() function but I''m not > > > quite getting it. > > > > > Help anyone? > > > > > Thanks, > > > Bob > > > > >-- Jesse E.I. Farmer e: jesse-h8Qh2m8E5SHQT0dZR+AlfA@public.gmane.org w: http://20bits.com --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---