开发者

What are the benefits to using iframes for ajax long polling?

开发者 https://www.devze.com 2022-12-18 20:22 出处:网络
What are the benefits of using ifra开发者_C百科mes 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 po

What are the benefits of using ifra开发者_C百科mes 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.

  • http://code.google.com/p/google-caja/
  • http://www.adsafe.org/
0

精彩评论

暂无评论...
验证码 换一张
取 消