Why is Gmail in an iFrame?
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.
The answer can be found here: https://webapps.stackexchange.com/questions/11521/why-is-gmail-in-an-iframe/11529#11529
Because it needs stateless behaviour ( instantaneous-ness ), and at the time of the writing it probably wasn't ideal to use XMLHttpRequest
.
And by the time XMLHttpRequest became popular it was probably already too complex to refactor everything.
This is all assuming they do not use XHR now, which they could be in combination with iframes.
精彩评论