Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <h1>Wipe script tag without reconneting</h1> <p>You can remove script tag every time that it is executed by adding some code when the server prints chunk.</p> <pre><code>&lt;script type="text/javascript"&gt; // Calls your message handler app.handle("Hello World"); // Removes this script element var scripts = document.getElementsByTagName("script"), elem = scripts[scripts.length - 1]; elem.parentNode.removeChild(elem); &lt;/script&gt; </code></pre> <p>Compressed version</p> <pre><code>&lt;script type="text/javascript"&gt; app.handle("Hello World"); (function(){var a=document.getElementsByTagName("script"),a=a[a.length-1];a.parentNode.removeChild(a)})(); &lt;/script&gt; </code></pre> <p>But, Hidden Iframe or Forever Iframe is too annoying to use as Alfred mentioned. Personally, I think this classical way makes Comet look graceless and charmless.</p> <h1>jQuery Stream</h1> <p>My recommendation is to use <a href="http://code.google.com/p/jquery-stream/" rel="nofollow">jQuery Stream</a>, which provides the unified two-way communication interface over WebSocket and HTTP protocol. It is a light-weight client-side JavaScript Library such as jQuery. </p> <p>The enhanced Iframe transport being used by jQuery Stream is different from the classical one in many ways, requries text/plain response containing only messages instead of text/html response and empties the response every time that it's handled. </p> <p>According to some user's <a href="http://code.google.com/p/jquery-stream/issues/detail?id=16#c2" rel="nofollow">test</a>, Internet Explorer 8 using enhanced Iframe transport has no problem with messages of several megabytes (unlike Firefox using XMLHttpRequest as transport, which is really struggling).</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload