473,396 Members | 1,929 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

does firefox have alimit on the number of loops dne with settimeout?

Hi,

I have created a script that needs to constanstly poll a webpage, I do
this with a controling function that fires off different functions to
do the work, then restarts by calling itself after a second using
settimeout.

on IE it runs forever, on firefox it stops after a while,

what am I doing wrong?
is there a limit on the number of times you can go around this type
loop you can go around in firefox?
if there is a limit, how do I get around it?

Would it be freak out if the function is already running when it is
fired again?

Aug 22 '06 #1
2 1358
ba*******@hotmail.com wrote:
Hi,

I have created a script that needs to constanstly poll a webpage, I do
this with a controling function that fires off different functions to
do the work, then restarts by calling itself after a second using
settimeout.

on IE it runs forever, on firefox it stops after a while,

what am I doing wrong?
Who knows? Where's the code?

is there a limit on the number of times you can go around this type
loop you can go around in firefox?
No.

if there is a limit, how do I get around it?
There is not limit, so there's nothing to "get around". ;-)

Would it be freak out if the function is already running when it is
fired again?
You can't call it while any other script is running. JavaScript is
single-threaded, if something else is running when setTimeout wants to
run, the call will be put in a que until its turn comes around.

At a guess, you are overloading the number of HTTP requests that
Firefox can make simultaneously - but that is just a guess.

--
Fred

Aug 22 '06 #2
Hi,

oz****@iinet.net.au wrote:
ba*******@hotmail.com wrote:
At a guess, you are overloading the number of HTTP requests that
Firefox can make simultaneously - but that is just a guess.
From our tests, the limit in Firefox is the same as in IE, that's 2
concurrent HTTP connections.

For IE:
http://blogs.msdn.com/ie/archive/2005/04/11/407189.aspx

For Firefox, it's quite easy to test by creating a web service sleeping
on the server, and having two windows call that service. When you open
the 3rd window, the request doesn't go through until one of the two
others expires (timeout) or comes back from the server.

HTH,
Laurent
--
Laurent Bugnion, GalaSoft
Software engineering: http://www.galasoft-LB.ch
Private/Malaysia: http://mypage.bluewin.ch/lbugnion
Support children in Calcutta: http://www.calcutta-espoir.ch
Aug 22 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Schraalhans Keukenmeester | last post by:
I have no clue why below code (found it somewhere and altered it a wee bit to my needs) will run without problem in both IE and Mozilla FireFox 1.0 but in the latter it takes up close to 100% cpu....
15
by: 50295 | last post by:
Hi everyone, This one is better experienced than explained, so I'm including a code sample below. Please and save (as an html file) and view with NN or Firefox (or maybe even Mozilla), and then...
4
by: Laurent Compere | last post by:
Hi all, I try to make a logo fade in. I wrote the code below that is simple and supposed to be compatible with IE6,Firefox and Netscape. It works pretty well under IE6 but under Firefox and...
6
by: daveyand | last post by:
Hey Guys, I've stumped. I created a function that does various things to select boxes. Namely Get All selected indexes, populate array with these values
4
by: badaczewski | last post by:
The following javascript appears on a popup window. <script language="javascript" type="text/javascript"> function InsertContact(value) { window.opener.CallBackContact(value); window.close();...
1
by: alex.malgaroli | last post by:
Hi all. I didn't find anything on the web regarding this different behaviour I found in Firefox (v. 2) and IE (v. 6), so I'm posting it here, maybe someone will benefit from this. I have a...
10
by: Muir | last post by:
I am needing, and would appreciate expert assistance for a Javascript program that I am using in a Website. The script is a Text and Image Fader, which only works on IE, but what I am trying to do...
1
by: ktang | last post by:
www.statehousenews.com/beta/scroller2.asp Is a code I wrote that retrieves data from a txt file and displays it into a txt scroller. XMLhttpRequest() is used to open and retrieve the data. The...
1
by: littlealex | last post by:
IE6 not displaying text correctly - IE 7 & Firefox 3 are fine! Need some help with this as fairly new to CSS! In IE6 the text for the following page doesn't display properly - rather than being...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.