Running split tests in an iframe (adjust nf_ab cookie settings)

I am trying to run a split test which may run in an iframe. However, since Chrome 84+, for cookies to work with an iframe they need to be set with:
SameSite=None & Secure

This would make sense to have the nf_ab cookie with these.

Is there a way to do this? Otherwise, is this the best place for making this request to the Netlify Tech team?

Thanks for the suggestion!

I’ll ask the team what they think (I don’t know if there are additionally downsides to it that could break other peoples’ existing usage, but there are fortunately a lot of people smarter than me on the team).

Since most of them are out of the office this week we may not get an answer for you before next week, just to set expectations.

1 Like

There are likely issues, especially for older versions of Safari and Mac OS, which converts SameSite=None to SameSite=Strict.

Though, in saying that, SameSite=None support is becoming widely adopted, so will be better to treat this as the norm and fallbacks like a nf_ab_legacy cookie or agent sniffing to support outdated systems.

Thanks for your patience while I reviewed this with our traffic team. They don’t have any immediate plans to make any changes to our split testing feature (including this one), but concur that it seems like a good idea the next time they do work on it, so I’ve filed the feature request for their consideration at that time.

We’ll follow up in this thread if the situation changes, but I would not expect it in the near future, so you’ll probably not want to wait for it to arrive if you have a timebound need.

1 Like