This may have already been asked by someone, but I can't seem to find the answer. At the risk of repeating a question, I would like for someone to explain the reason that Google's Gmail is placed inside of an iFrame HTML element instead of simply placing the code in the document itself.If this has been asked (and answered) before, please direct me to the correct answer since my searches haven't resulted in any definitive answers. Again, sorry if this is a repeat.Thanks.
Why is Gmail in an iFrame?
gmail;html;iframe;ajax
According to the Gmail blog, an iFrame is used to host the code which handles gmail so that messages opened in new windows can be used without having to reload resources, and can persist even if the parent window is closed. See this blog post for some more details on how it works.For the technically curious among you, our friends on the Chrome team made it possible to transfer the code that runs Gmail from one window to another as the window closes. When the window that hosts the code fires an unload event, we move the iframe with the code to a surviving window. Everything continues to run, including timers and outstanding requests.