Forum Discussion

WMS's avatar
WMS
Community Member
11 hours ago

Getting localstorage key?

Is it possible to access the localStorage key used by a Storyline project when it's published to the web? On the last slide, I want to clear the localStorage for that lesson so that the next student...
  •  

    As far as I know there is no way to get this key with Javascript, not even via the undocumented DS interface

     

    therefore you have to insert the key into the course manually or through a small (python) script

     

    extract the "resume key" from "html5/data/js/data.js"

    search for 

    • "resume":{"id":"

     

     

    add one line to "story.html"

    now you can use

    window.localStorageKey

    to access the localStorage with your JavaScript

    IMPORTANT: On every publish a new key is generated, so you have to redo all steps