문제

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.

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top