Forum Discussion
Web Objects / Master Slides and Caching between slides..
Testing on the LMS it seems to cache the WO ok - disabling the cache with the dev tools appears to substantiate this. All good.
- LonGoldstein-522 months agoCommunity Member
Hello Chris, This thread is a bit old but it seems to reflect a similar challenge I am trying to find a solution for. Could you clarify, is this a solution you found to keeping Web Objects loaded so you can return to them without reloading? If so, what exactly did you do with the LMS? How did you disable the cache? With what "dev tools"?
I am trying to find a way to load multiple web objects (satellite loop data players) such that I can switch between the WOs (data loopers) using tabs on a single page, where the WO continues in the same state it was left in, rather than reloading (and starting over) each time.
Any ideas welcome!
- SamHill2 months agoSuper Hero
Hi LonGoldstein-52 I think you would need to use cookies for this, or, use Storyline variables to maintain state, and use JavaScript from your WOs to access the SL variables:
const slplayer = GetPlayer(); let ms1 = slplayer.GetVar("mystate1"); if(ms1 === "visited") { // do this }else{ // do that }
Also, using the content of your WO to set the variable in Storyline
const slplayer = GetPlayer(); const btn = document.querySelector("button[id=button1]"); btn.addEventListener("click",function(){ slplayer.SetVar("mystate1","visited"); })
This will also ensure that, if using an LMS, the variable values will be stored between sessions.
Is that the kind of thing you are looking for?