Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-16944

Allow browser storage of specific XWiki options


    • Type: New Feature
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 11.10.2
    • Fix Version/s: None
    • Labels:
    • Difficulty:
    • Similar issues:


      I propose that we create a very simple framework to allow using browser storage in our javascript calls.
      The idea is the following: I want to access from Javascript to some options of the wiki to enable or disable features (e.g. to know if it's configured to use parentchild or reference hierarchy mode for example), now I don't necessarily want to make each time a REST call to retrieve this value since it can be costly very quickly.
      So my idea would be to load some defined values in the session storage of the browser, and to reuse these values when needed. The storage would be reset when the values are edited.

      We might discuss the benefits of this approach compared to put more stuff in xwiki-metadata: IMO this approach is more extensible (we won't rely on fixed keywords for the values, but on javascript objects) and fit its specific need: to make available on Javascript some values that are often read and rarely written.

      AFAICS browser storage is compliant with our browser support strategy: I compared the data from https://www.w3schools.com/html/html5_webstorage.asp and https://dev.xwiki.org/xwiki/bin/view/Community/SupportStrategy/BrowserSupportStrategy


          Issue Links



              • Assignee:
                surli Simon Urli
              • Votes:
                0 Vote for this issue
                3 Start watching this issue


                • Created:
                  Date of First Response: