I wrote a small post on Cakemail blog about using iframes, here an excerpt and a link to the full article.

If you are a front-end developer that need to use a cross-domain iframe, you know pain. You could write a nice bit of code and get it working on firefox but it would crash on ie. You would think that would be easy – facebook, twitter and all the others cool kids are doing it! Well, not quite.

Here at Cakemail we are currently building a platform that will enable our users to create forms and embed them in their website directly (think an email list subscription form). So basically, we needed to have javascript control in the parent and in the child.

We had 2 problems to solve based on embedding. One was to change the iframe height dynamically (no way in hell were we going to save the iframe height in a database). And sometimes, depending on what functionality our users embedded in their website, we needed to actually redirect the parent page.

Why it is so hard?

Read the rest of the article here

2 thoughts on “The iframe cross-domain policy problem

Comments are closed.