Best way to put 4 experiments (.html + .js + .css triplets) in one

Hi all,

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?

  1. 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.

  2. 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.
    Problems:

  • 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.
  1. 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!