Uploaded image for project: 'Moodle app'
  1. Moodle app
  2. MOBILE-3072

Append the version to the url of site plugin styles to avoid cache

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide

      This issue should be tested both in Android and iOS.

      1. Install the plugin attached to this issue in a Moodle site, in the local folder.
      2. In the app, login in that site and check that the header color changes to blue.
      3. Edit the file SITEURL/local/menutest/mystyles.css and change the color to the one you want.
      4. Edit the file SITEURL/local/menutest/db/mobile.php and change the version of the styles.
      5. Restart the app and check that the header color now is set to the color you set in step 3.
      Show
      This issue should be tested both in Android and iOS. Install the plugin attached to this issue in a Moodle site, in the local folder. In the app, login in that site and check that the header color changes to blue. Edit the file SITEURL/local/menutest/mystyles.css and change the color to the one you want. Edit the file SITEURL/local/menutest/db/mobile.php and change the version of the styles. Restart the app and check that the header color now is set to the color you set in step 3.
    • Affected Branches:
      MOODLE_37_STABLE
    • Fixed Branches:
      MOODLE_37_STABLE
    • Sprint:
      Moodle App 3.7.1

      Description

      Reported by Sam Marshall. If the "version" of a CSS file in a site plugin changes, the app will try to download the file again, but since the URL is the same it is possible that it returns a cached file. We should append the version to the URL to make sure it has changed and the cache is not used.

        Attachments

        1. android.jpeg
          android.jpeg
          44 kB
        2. ios.jpeg
          ios.jpeg
          42 kB
        3. menutest.zip
          10 kB
        4. webapp.png
          webapp.png
          80 kB

          Activity

            People

            • Assignee:
              dpalou Dani Palou
              Reporter:
              dpalou Dani Palou
              Peer reviewer:
              Albert Gasset
              Integrator:
              Juan Leyva
              Tester:
              Juan Leyva
              Participants:
              Component watchers:
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                30/Aug/19