GauravBasu / jquery-stream

Automatically exported from code.google.com/p/jquery-stream
0 stars 0 forks source link

Providing options to control polling interval #19

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
The setTimeout interval being used in iterate function doesn't need to be 0. 
The increased interval will decrease CPU usage and ease the browser's burden.

This will affect XMLHttpRequest polling for Opera and Hidden Iframe.

Original issue reported on code.google.com by flowersi...@gmail.com on 10 Jul 2011 at 1:07

GoogleCodeExporter commented 9 years ago
Another way could be to send javascript from the server to the client and the 
client instantly executes the recived js-chunks, so there's no need to iterate 
the iframe's data. You can handle it in that way, that you send a special 
data-form-field to the server, so that the server knows, that he has to send 
"javascript".

Original comment by sebastia...@gmail.com on 23 Jul 2011 at 11:15

GoogleCodeExporter commented 9 years ago
One of the aims of the jQuery Stream was to provide the interface which allows 
both the client-side and the server-side developers to work regardless of user 
agent and transport.

The classical way that executes script chunks within text/html document 
requires the server to be aware of user agent or transport, respond depending 
on a specific transport, and escape data to fit into the JavaScript syntax. So, 
I thought out the current polling way instead of the classical one.

I'll provide options controlling each interval differently from the issue's 
title for real-time communication.

Original comment by flowersi...@gmail.com on 26 Jul 2011 at 2:36

GoogleCodeExporter commented 9 years ago

Original comment by flowersi...@gmail.com on 30 Jul 2011 at 7:35