Hi,
how can I specify the order of included JavaScript files using
javascript_include_tag :all?
Thanks,
Gustavo
Hi,
how can I specify the order of included JavaScript files using
javascript_include_tag :all?
Thanks,
Gustavo
“Gustavo de Sá Carvalho H.” <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,
Gustavo
Marnen Laibow-Koser
http://www.marnen.org
[email protected]
Sent from my iPhone
On Wed, Dec 8, 2010 at 10:19 PM, Marnen Laibow-Koser
[email protected] 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.
“Gustavo de Sá Carvalho H.” <gustavohonorato wrote in post
#967389:
On Wed, Dec 8, 2010 at 10:19 PM, Marnen Laibow-Koser
[email protected] 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.
Marnen Laibow-Koser
http://www.marnen.org
[email protected]
Sent from my iPhone
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs