Hi, how can I specify the order of included JavaScript files using javascript_include_tag :all? Thanks, Gustavo -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
"Gustavo de Sá Carvalho Honorato" <gustavohonorato wrote in post #967278:> Hi, > > how can I specify the order of included JavaScript files using > javascript_include_tag :all?I don''t think you can. It''s normally bad practice to use :all anyway. Just include the JS you need on that particular page.> > Thanks, > GustavoBest, -- Marnen Laibow-Koser http://www.marnen.org marnen-sbuyVjPbboAdnm+yROfE0A@public.gmane.org Sent from my iPhone -- Posted via http://www.ruby-forum.com/. -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org 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.
On Wed, Dec 8, 2010 at 10:19 PM, Marnen Laibow-Koser <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> > "Gustavo de Sá Carvalho Honorato" <gustavohonorato wrote in post > #967278: > > Hi, > > > > how can I specify the order of included JavaScript files using > > javascript_include_tag :all? > > I don''t think you can. > > It''s normally bad practice to use :all anyway. Just include the JS you > need on that particular page. >But in this Scalling Rails tutorial (http://railslab.newrelic.com/2009/01/22/page-responsiveness), they recommend to use :all in production systems to reduce page responsiveness. They said that in production enviroments when you use "javascript_include_tag :all", Rails automatically wraps all javascript files in just one minified file, reducing the total javascript size and the overhead of multiples GET request.> > > > > Thanks, > > Gustavo > > Best, > -- > Marnen Laibow-Koser > http://www.marnen.org > marnen-sbuyVjPbboAdnm+yROfE0A@public.gmane.org > > Sent from my iPhone > > -- > Posted via http://www.ruby-forum.com/. > > -- > 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > 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. >-- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org 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.
"Gustavo de Sá Carvalho Honorato" <gustavohonorato wrote in post #967389:> On Wed, Dec 8, 2010 at 10:19 PM, Marnen Laibow-Koser > <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote: >> It''s normally bad practice to use :all anyway. Just include the JS you >> need on that particular page. >> > > But in this Scalling Rails tutorial > (http://railslab.newrelic.com/2009/01/22/page-responsiveness), they > recommend to use :all in production systems to reduce page > responsiveness. They said that in production enviroments when you use > "javascript_include_tag :all", Rails automatically wraps all > javascript files in just one minified file, reducing the total > javascript size and the overhead of multiples GET request.Apparently you don''t need :all for that. Look at the third syntax. You don''t usually need all your JS on every page. Best, -- Marnen Laibow-Koser http://www.marnen.org marnen-sbuyVjPbboAdnm+yROfE0A@public.gmane.org Sent from my iPhone -- Posted via http://www.ruby-forum.com/. -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org 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.