What are the benefits of using iframes for Comet long polling? Why not just keep an asynchronous ajax request in a script file pulled into the main page? Thanks.
+3
A:
It makes portability to IE possible: http://softwareas.com/portable-comet-its-the-iframe-stupid
Also, some people use it as a security feature. Within an iFrame you can enclose everything within a JavaScript closure and improve your security. There are better ideas for security though.
Kris Walker
2010-01-31 09:25:44
Thanks. So are iframes a requirement to get ajax to work with IE?
ensnare
2010-02-01 04:16:22
Apparently iframes are a requirement to get Comet Ajax to work with IE. I can't say for sure, because I've never tried it without an iframe.
Kris Walker
2010-02-01 08:39:21