-1

Firstly just to set the scene, im not trying to pass data between the main website and the website in the iframe. I just want the page in the iframe to work.

So..

Lets say i have an iframe on site1.com linking to site2.com

The site2.com domain uses php sessions. If i set a session attribute on index.php and then click a link to index2.php , the session is broken and it cannot get the data..

I dont understand why sessions are broken when loading the page within an iframe. Again, this is only keeping a session within the iframe. Not between site1 and site2.

Just want the app in site2.com to work inside an iframe.

Am I missing something obvious here?

Thanks G

Graham Smart
  • 43
  • 1
  • 12
  • 2
    this may help ... https://medium.com/trabe/cookies-and-iframes-f7cca58b3b9e . You can probably confirm by tweaking settings in your browser (although that obviously isn't an actual solution) – timchessish Aug 18 '23 at 10:18
  • 1
    _"Am I missing something obvious here?"_ - yes; that 3rd-party cookies often get blocked by default these days, to better protect users from tracking across the web. – CBroe Aug 18 '23 at 10:28

0 Answers0