we are working on an online battery with 4 tasks in jspsych and now putting it together on Pavlovia.
I have a question - what would be the best possible way to put all 4 (independent) experiments into a one?
One idea, of course, would be to merge the css, use one index.html and link to 4 different .js files.
Problems: All experiments are done by different people and merging might take excessive time. Also, it would not be that flexible for the future changes.
Use window.location redirecting. This is the approach we have initially chosen. We use local storage to pass along the session ID as well as other variables and at the end of each experiment we redirect a participant to a different .html files.
- The full-screen mode is turned off during each redirecting and has to be turned on again.
- Preloading of images and stimuli occurs during each redirect; if preloading fails, the participant will drop out.
- Use iframe. This is the option that seems to be the most promising. We would have one index.html within which everything would happen. As far as I understood, we wouldn’t have to pass any parameters along since we would be on the same page all the time, the full-screen would not turn off and preloading could potentially occur in the very beginning.
Problems: Are there any?
Could you please elaborate why we should or shouldn’t use one or the other approach? If there is another/better way to do it I did not mention, please suggest it.
Thank you a lot!