Is it possible to use cookies inside an iframe?

Hello, I’m trying to use cookies inside an iFrame, but I’m having some problems. Is there a way to use them?

1 Like

Hi @Gabriel_da_Costa,

Could you tell me more about what issues you are seeing? Screenshots would be very helpful. What is your use case around using an iFrame? Are you using an External Website Block on a dashboard?

If you are attempting to put an iframe on a dashboard, you will need to ensure that the cookie Same-Site is set to None. Google Chrome automatically sets cookies to Same-Site=Lax which prevents the cookie to be used in an iframe by default.

For example, if you are using Losant to set the cookie, you can find the setting here:

Any additional information you can provide will be very beneficial.

Thank you,

Hello, the situation we have is the following, we have built a dashboard with custom blocks that have different ways of visualization and we would like to save these user preferences in cookies.

We considered using user tags, but due to some size limitations, we disregarded the idea.

In custom blocks, we have the following error:


Thank you for including that screenshot, it is a tremendous help.

What you are running into is a security setting that we have implemented. It is not something that we will change in the short term, but I will bring it up with our engineering team.

You mentioned running into size limitations when considering user tags, could you explain that a bit more?

Thank you,