Differences between revisions 2 and 3
Revision 2 as of 2009-10-16 08:34:40
Size: 1799
Editor: limodou
Comment:
Revision 3 as of 2009-12-25 07:09:44
Size: 1801
Editor: localhost
Comment: converted to 1.6 markup
Deletions are marked like this. Additions are marked like this.
Line 4: Line 4:
[[TableOfContents]] <<TableOfContents>>
Line 6: Line 6:
[[Include(ZPyUGnav)]] <<Include(ZPyUGnav)>>
Line 22: Line 22:
 * [http://www.google.com/codesearch?hl=en&q=comet+package:http://eurasia\.googlecode\.com+show:Z7dg_KJaLK8:AtJJj55FCnQ:Z7dg_KJaLK8&sa=N&cd=2&ct=rc&cs_p=http://eurasia.googlecode.com/svn&cs_f=trunk/Eurasia/x-response.py#l49 x-response.py#l49]  * [[http://www.google.com/codesearch?hl=en&q=comet+package:http://eurasia\.googlecode\.com+show:Z7dg_KJaLK8:AtJJj55FCnQ:Z7dg_KJaLK8&sa=N&cd=2&ct=rc&cs_p=http://eurasia.googlecode.com/svn&cs_f=trunk/Eurasia/x-response.py#l49|x-response.py#l49]]

欧亚奇技.FUCK IE

张沈鹏 <[email protected]>
回覆至     [email protected]
收件人     [email protected]
日期      2008年11月29日 上午 2:09
主旨      [eurasia-users] 这一句是什么意思呢?joke?

这一句是什么意思呢?joke?:

  'if(document.all) __comet__.escape("FUCK IE");\r\n'

沈崴 <[email protected]>
回覆至     [email protected]
收件人     eurasia-users <[email protected]>
日期      2008年11月29日 下午 5:48
主旨      [eurasia-users] Re: 这一句是什么意思呢?joke?
  • 在 Eurasia3 中, 服务器可以即时调用客户端 (浏览器) 的 JavaScript 函数。这里, 服务器会发送 JavaScript

指令到客户端, 不幸的是如果客户端是 IE 浏览器, 那么 IE 浏览器会忽略一切设置把服务器发送给客户端的内容缓存起来, 这样的话, 就无法实现 JavaScript 的即时调用。

  • 这是 IE 的一个缺陷。Eurasia3 在 Comet 长连接建立时调用 JavaScript 的 escape 函数, 可以绕过这个问

题, 使 IE 可以立即执行后面服务器发来的 JavaScript 指令。这便是这行代码的作用, 是必不可少的。

  • 把代码写成 escape("FUCK IE") 意为解决 IE Bug 的代码, 话说回来 IE 确实挺恶心的 :)


反馈

MiscItems/2008-11-29 (last edited 2009-12-25 07:09:44 by localhost)