B
B
budyakov2014-08-22 15:46:30
safari
budyakov, 2014-08-22 15:46:30

How to make iframe work in Safari?

I'm trying to embed a payment form into a website. The problem is that there is a complication with the Safari browser when dealing with cookies using an iframe.

The page with the problem is demo.payu-api.ru/LU/cookie_hack1.html The

bug has long been known, described here habrahabr.ru/post/112077 , but the solution from example 3 does not work: when you go to the site from Safari, the page in the frame created through JS it is loaded not in the iframe, but forcibly on the whole page. If you click on the link again, this does not happen, because. cookies are already set.

It is necessary without changing the payment page itself (what is inside the iframe) to make it work like in other browsers.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
E
Evgeny Petrov, 2014-08-22
@Petroveg

1. In its original form, the problem exists in IE, not only in Safari.
2. You already have both iframes in the code. What JS generated iframe are you talking about?
3. If you disable the call to the non-existent killPreload method when loading the contents of the second iframe, the described problem will disappear.
PySy. And close the bottom div.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question