- Authors and Contributors
- Support or Contact
A common theme in iframes is for developers to want the iframe to communicate with the parent window when something has happened. Perhaps a user has logged in or pressed a button within the iframe. This is may be used for something like an OAuth login screen, such as Facebook's login, or Google's.
The assumption here is that the iframe website knows what the URL is of the parent website. This is usually accomplished by feeding the iframe website the URL in a query string, such as
http://logindomain.com/iframepage.html?referrer=http%3A%2F%2Fouterdomain.com%2Flogin.htmlNotice how the URL for the main domain's login page is in the "referrer" query string. This allows the iframe's webpage to know what domain to communicate with.
Allan Bogh (@ajbogh) - Creator and lead developer