Issue Details (XML | Word | Printable)

Key: MDL-16693
Type: Sub-task Sub-task
Status: Resolved Resolved
Resolution: Fixed
Priority: Minor Minor
Assignee: Tim Hunt
Reporter: Tim Hunt
Votes: 0
Watchers: 0
Operations

Add/Edit UI Mockup to this issue
If you were logged in you would be able to see more operations.
Moodle
MDL-16583

Change require_js so JavaScript is included in the page footer by default, but with an option to output it sooner

Created: 26/Sep/08 12:01 PM   Updated: 12/Jun/09 07:33 PM
Return to search
Component/s: Lib
Affects Version/s: 2.0
Fix Version/s: 2.0

Participants: Tim Hunt
Security Level: None
Resolved date: 12/Jun/09
Affected Branches: MOODLE_20_STABLE
Fixed Branches: MOODLE_20_STABLE


 Description  « Hide
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.

 All   Comments   Change History   Version Control      Sort Order: Ascending order - Click to sort in descending order
Tim Hunt added a comment - 12/Jun/09 07:33 PM
Thanks to the changes in MDL-16693, this is now effectively done.