I'm trying to set session or cookie's in an iframe...
# cfml-general
p
I'm trying to set session or cookie's in an iframed form page, and it looks like it is forgotten the moment the parent page is reloaded. When outside of the iframe, cookies and session are maintained. I've got sessionmanagement on in the application.cfc, is there something else I need to do on my side, or do I need to get some sort of cross-site policy changed with the parent page?
d
What happens if you reload just the iframed page without reloading the parent frame? Does it retain the session variables and cookies?
p
It seems to maintain state as long as the parent isn't refreshed - if I reopen the frame in a new window it also remembers it.
d
Are both the parent page and the iframe page on the same CF instance, and do they have the same app name? (In other words, do they share the same session scope?)
p
Thanks for the help! The parent page hosted completely elsewhere, so there isn't anything I can do to match sessions... Fortunately I think it'll be okay for this time, but unfortunately the client is unlikely to change things on their side.
👍 1