...and is it a problem? The javascript include files, which I have specified in my /layouts/application.html.erb, which acts as page shell where I insert other views, specifies the following: <%= javascript_include_tag :defaults %> <%= javascript_include_tag "uplog" %> <%= javascript_include_tag :all, :cache => true %> <%= active_scaffold_includes %> <%= calendar_date_select_includes %> <%= javascript_include_tag ''redbox'' %> But, when a simple page renders, using it, I see: <script src="/javascripts/prototype.js?1259331043" type="text/ javascript"></script> <script src="/javascripts/effects.js?1249463190" type="text/ javascript"></script> <script src="/javascripts/dragdrop.js?1249463190" type="text/ javascript"></script> <script src="/javascripts/controls.js?1249463190" type="text/ javascript"></script> <script src="/javascripts/application.js?1260018527" type="text/ javascript"></script> <script src="/javascripts/uplog.js?1259343311" type="text/ javascript"></script> <script src="/javascripts/prototype.js?1259331043" type="text/ javascript"></script> <script src="/javascripts/effects.js?1249463190" type="text/ javascript"></script> <script src="/javascripts/dragdrop.js?1249463190" type="text/ javascript"></script> <script src="/javascripts/controls.js?1249463190" type="text/ javascript"></script> <script src="/javascripts/application.js?1260018527" type="text/ javascript"></script> <script src="/javascripts/editablecombo.js?1252241445" type="text/ javascript"></script> <script src="/javascripts/redbox.js?1256343437" type="text/ javascript"></script> <script src="/javascripts/uplog.js?1259343311" type="text/ javascript"></script> <script src="/javascripts/active_scaffold/default/ active_scaffold.js?1260018604" type="text/javascript"></script> <script src="/javascripts/active_scaffold/default/dhtml_history.js? 1260018604" type="text/javascript"></script> <script src="/javascripts/active_scaffold/default/form_enhancements.js? 1260018604" type="text/javascript"></script> <script src="/javascripts/active_scaffold/default/rico_corner.js? 1260018604" type="text/javascript"></script> NOTICE how many of these are repeated. How does that happen (and is it bad?) -R. Vince -- 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.
2009/12/5 RVince <rvince99-PkbjNfxxIARBDgjK7y7TUQ@public.gmane.org>:> ...and is it a problem? The javascript include files, which I have > specified in my /layouts/application.html.erb, which acts as page > shell where I insert other views, specifies the following: > > <%= javascript_include_tag :defaults %> > <%= javascript_include_tag "uplog" %> > <%= javascript_include_tag :all, :cache => true %> > <%= active_scaffold_includes %> > <%= calendar_date_select_includes %> > <%= javascript_include_tag ''redbox'' %> > > But, when a simple page renders, using it, I see: > > <script src="/javascripts/prototype.js?1259331043" type="text/ > javascript"></script> > <script src="/javascripts/effects.js?1249463190" type="text/ > javascript"></script> > <script src="/javascripts/dragdrop.js?1249463190" type="text/ > javascript"></script> > <script src="/javascripts/controls.js?1249463190" type="text/ > javascript"></script> > <script src="/javascripts/application.js?1260018527" type="text/ > javascript"></script> > <script src="/javascripts/uplog.js?1259343311" type="text/ > javascript"></script> > <script src="/javascripts/prototype.js?1259331043" type="text/ > javascript"></script> > > <script src="/javascripts/effects.js?1249463190" type="text/ > javascript"></script> > <script src="/javascripts/dragdrop.js?1249463190" type="text/ > javascript"></script> > <script src="/javascripts/controls.js?1249463190" type="text/ > javascript"></script> > <script src="/javascripts/application.js?1260018527" type="text/ > javascript"></script> > <script src="/javascripts/editablecombo.js?1252241445" type="text/ > javascript"></script> > <script src="/javascripts/redbox.js?1256343437" type="text/ > javascript"></script> > <script src="/javascripts/uplog.js?1259343311" type="text/ > javascript"></script> > <script src="/javascripts/active_scaffold/default/ > active_scaffold.js?1260018604" type="text/javascript"></script> > > <script src="/javascripts/active_scaffold/default/dhtml_history.js? > 1260018604" type="text/javascript"></script> > <script src="/javascripts/active_scaffold/default/form_enhancements.js? > 1260018604" type="text/javascript"></script> > <script src="/javascripts/active_scaffold/default/rico_corner.js? > 1260018604" type="text/javascript"></script> > > > NOTICE how many of these are repeated. How does that happen (and is it > bad?) -R. Vince >Some of your include tag specs are automatically including others. If you try commenting some out and see what happens you will work it out. It is making extra work for the browser, though hopefully it is clever enough to work out not to fetch them again. In your situation I would tidy it up though, just as a matter of principle if nothing else. 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-/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.
> <%= javascript_include_tag :defaults %> > <%= javascript_include_tag :all, :cache => true %>These two lines are both calling the same set of scripts. Just use one (and the latter takes advantage of caching), or call them individually with caching, as in: <%= javascript_include_tag ''script_1'', ''script_2'', ''script_3'', :cache => ''cache/all'' %> -- 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.