| Field |
Original Value |
New Value |
|
Description
|
The advice about improving the performance of web pages is to put the JavaScript in the footer of the page. This lets the actual content can load more quickly, so the user can get on with things. JavaScript that just sets up event handlers, and the libraries required to do this, can safely be loaded later.
Therefore, add an optional $requiredimmediately argument to require_js that defaults to false. When it is false, the include link is only printed in the page footer. When it is true, the link is output according to the current logic.
|
The advice about improving the performance of web pages is to put the JavaScript in the footer of the page. This lets the actual content can load more quickly, so the user can get on with things. JavaScript that just sets up event handlers, and the libraries required to do this, can safely be loaded later.
Therefore, add an optional $loadimmediately argument to require_js that defaults to false. When it is false, the include link is only printed in the page footer. When it is true, the link is output according to the current logic.
|
|
Summary
|
Change fequire_js so JavaScript is included in the page footer by default, but with an option to output it sooner.
|
Change require_js so JavaScript is included in the page footer by default, but with an option to output it sooner
|
MDL-16693, this is now effectively done.