-
March 29th, 2007, 03:52 PM
#1
Hitting ESC stops streaming
Hitting ESC (escape) button on a browser makes it stop downloading resources.
This also affects Lightstreamer's streaming connection, so if you hit the ESC button while you're looking a Lightstreamer application you will see that the streaming connection closes down (btw note that the web client will try to recover the situation after a while opening a new connection).
To avoid this problem on your application you should add a little piece of javascript that listen "esc" pressures and stops the bubbling of the event so that the streaming connection remains open. You can use this (or something equivalent):
Code javascript:
function checkEscape(e) {
if(!e) e = event;
if(e.keyCode == 27) {
return false;
}
}
document.onkeydown = checkEscape;
document.onkeypress = checkEscape;
We don't embed this script in our libraries cause you could think that when your user hits the esc button is cause he wants to close any open connection and so also Lightstreamer's.
[Thanks to Zoran Perak for the hint]
-
April 19th, 2007, 07:42 PM
#2
I find that both IE and Firefox go into the stalled state when I hit ESC, then they reconnect and revert to their normal streaming condition after that.
Similar Threads
-
By Rakot in forum General
Replies: 1
Last Post: May 14th, 2010, 11:06 AM
-
By ivailo in forum Client SDKs
Replies: 2
Last Post: December 1st, 2009, 12:07 PM
-
By riwang in forum Client SDKs
Replies: 9
Last Post: March 31st, 2009, 01:16 PM
-
By rakeshxp in forum Client SDKs
Replies: 1
Last Post: August 14th, 2007, 10:03 AM
-
By Waddy in forum Client SDKs
Replies: 1
Last Post: March 27th, 2007, 03:58 PM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
All times are GMT +1. The time now is 08:35 PM.
Bookmarks