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

cleanup and improved caching in lib/javascript.php

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Fixed
    • Minor
    • 2.6
    • 2.5
    • Caching, JavaScript
    • None
    • MOODLE_25_STABLE
    • MOODLE_26_STABLE
    • w29_MDL-40546_m26_jscache
    • Hide

      0/ install moodle (verify JS scripts get loaded properly)
      1/ make sure JS caching is enabled
      2/ load page that depends on some JS served via lib/javascript.php file
      3/ verify the that the JS gets loaded with proper cache headers
      4/ verify the cache files are created in $CFG->cachedir/js/ (dataroot/cache/ by default)
      5/ purge caches
      6/ verify the JS file is served with different etag and URL (check revision number)
      7/ set $CFG->cachejs = 0 in your config.php
      8/ verify the lib/javascript.php serves files without caching headers

      Show
      0/ install moodle (verify JS scripts get loaded properly) 1/ make sure JS caching is enabled 2/ load page that depends on some JS served via lib/javascript.php file 3/ verify the that the JS gets loaded with proper cache headers 4/ verify the cache files are created in $CFG->cachedir/js/ (dataroot/cache/ by default) 5/ purge caches 6/ verify the JS file is served with different etag and URL (check revision number) 7/ set $CFG->cachejs = 0 in your config.php 8/ verify the lib/javascript.php serves files without caching headers

    Description

      Goals:

      • solve caching issues when $CFG->cachejs = 0 (at present we just send links to static JS files which confuses developers because they need to invalidate browser caches manually)
      • improve coding style
      • preparation for introduction of $CFG->localcachedir

      Attachments

        Issue Links

          Activity

            People

              skodak Petr Skoda
              skodak Petr Skoda
              Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
              Frédéric Massart Frédéric Massart
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                18/Nov/13