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

Whitelist for local storage keys

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Won't Do
    • Minor
    • None
    • 4.1.6
    • JavaScript
    • None
    • MOODLE_401_STABLE

    Description

      It would be nice if purging the JS cache would not delete everything in local storage (see lib/amd/src/storagewrapper.js#L98). Maybe a whitelist can be added where keys can be stored that should not be cleared. This could be a simple admin setting with a text field where you can enter a comma-seperated list of keys. Another possibility would be to have a callback function (called something like "get_local_storage_keys_to_preserve") that each plugin can implement in its lib.php.

      Our use case: We have implemented a cookie notice that gets displayed on every page. It has an "accept" button which just sets "cookies-accepted: true" in local storage. But on every upgrade the local storage gets cleared and the cookie notice gets shown for all users again.

      Attachments

        Activity

          People

            Unassigned Unassigned
            tschroeder Tim Schroeder
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Clockify

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.