Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-14731

Allow YUI files to be loaded from Yahoo directly

    XMLWordPrintable

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.9
    • Fix Version/s: 2.0
    • Component/s: JavaScript
    • Labels:
      None
    • Database:
      Any
    • Affected Branches:
      MOODLE_19_STABLE
    • Fixed Branches:
      MOODLE_20_STABLE

      Description

      I am always looking at ways to speed up our page loads. One easy way to get a bit more speed is to load the YUI library directly from Yahoo's servers. They do allow this and have a page dedicated to doing it here: http://developer.yahoo.com/yui/articles/hosting/

      I am attaching a patch that is a simple modification to the ajaxlib.php file. It also relies on a CFG parameter to be set. The default is to load the files from the local filesystem. Only if the CFG variable is set will it load them from Yahoo.

      One thing that I would like to change with this is that I had to hardcode the YUI version number. It would be great if that was an easier bit of information to pull dynamically. I thought about parsing the YUI README file to get the version, but felt like that was a bit sloppy.

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                24/Nov/10