If I use window.open("https://www.myaddress.com","_self"); at the end of my survey, could this cause issues with saving data since this is going to open a new page in the same tab? So far, I’ve used it without _self and it works OK, but I am really bothered by the fact that Pavlovia tab stays open and someone can keep clicking the refresh button in their browser after a test and eat up my credits. Or is there another, more efficient way of preventing this rather than redirect in the same tab?
Hi @pavle, are you aware of the “Completed URL” option in experiment settings → online? This allows you to redirect your participants to a URL after completing your experiment.
Thanks @ajus for your suggestion. Unfortunately, I cannot use this option since depending on their overall score (if they’ve passed or failed the test), I redirect them to different web addresses (in the code) plus I add a few parameters to URLs.
Have you tested this? I’ve always had to use a code component of setRedirectUrls in a code component. If the completed URL takes any variables other than expInfo set at the start then that’s news to me.