Issue with iframe, https urls, and payment gateway and P3P cookie issue

1 replies
I have developed a site, where after certain functionality subscriber is redirected to a members promotional page. Where user will be shown a promotional page which is rendered in an iframe. After that on window exit event two more promotional links entered by members are shown to subscribers. The problem here is as we know iframe have some issues like
  1. Some https sites don't support iframe.
  2. Some site returns no contents with an iframe error.
  3. Payment gateway doesn't support in iframe.
  4. P3P in IE restricts to save cookies of iframe link.
Now the requirement is I have to keep promotional flow as it is but want to solve above iframe issues. Please help me to resolve this issue or any other suggestion I can work on. Thanks in advance.
#cookie #gateway #https #iframe #issue #javascript #p3p #payment #php #urls
  • Profile picture of the author SoftwareGeek
    When you have iframes, use window.postMessage() to pass data back forth from the iframe and the main window in javascript. You can even by-pass cross-domain restrictions and set first party cookies this way.

    Once you figured out how to use postMessage() properly, most of the iframe related restrictions can be removed using it.

    The only catch is that you need to be able to embed the listener for your javascript messages in the main window. This is possible if you have some control over the main window, or get someone to embed a small piece of javascript in the main window.
    {{ DiscussionBoard.errors[8657729].message }}

Trending Topics