Javascript, webservices and Firefox

N

Nightcrawler

I recently moved over a bunch of functionality to use javascript and
webservices. I ran into the issue where a webservice taking longer
than 10 seconds to respond will cause Firefox to throw a fit and show
the "script has stopped responding" warning.

Is there a way around this? What can possible be done so that firefox
keeps the connection alive without showing that annoying message.

All I can find about this online is to change the firefox settings in
about:config but this is not a solution to me. That would require
every firefox visitor to change their settings to view my site.

Any input would be appreciated.

Thanks
 
R

Richard Cornford

Nightcrawler said:
I recently moved over a bunch of functionality to use
javascript and webservices. I ran into the issue where
a webservice taking longer than 10 seconds to respond
will cause Firefox to throw a fit and show the "script
has stopped responding" warning.

Is there a way around this?
<snip>

You have posted no code so nobody knows what you are actually doing. So
the best you will get are guesses. Two possible explanations for your
symptoms stand out to me.

1. You are actively polling the - readystate - of the
response in a - while - (or similar) loop.
2. You are making synchronous requests where you should
be making asynchronous requests (as only asynchronous
requests should be used, regardless of the additional
complexity that requires in handling multiple
asynchronous inputs).

The latter seems more likely (as the former is insane) and so you solve
the problem by only making asynchronous requests.

Richard.
 
K

Karl

I recently moved over a bunch of functionality to use
javascript and webservices. I ran into the issue where
a webservice taking longer than 10 seconds to respond
will cause Firefox to throw a fit and show the "script
has stopped responding" warning.

Is there a way around this?
<snip>

You have posted no code so nobody knows what you are actually doing. So
the best you will get are guesses. Two possible explanations for your
symptoms stand out to me.

1. You are actively polling the - readystate - of the
response in a - while - (or similar) loop.
2. You are making synchronous requests where you should
be making asynchronous requests (as only asynchronous
requests should be used, regardless of the additional
complexity that requires in handling multiple
asynchronous inputs).

The latter seems more likely (as the former is insane) and so you solve
the problem by only making asynchronous requests.

Richard.
[/QUOTE]

I've found AJAX to be very useful for processing in the background without
having to reload entire documents, etc. May make the programming a litte more
complex, but it's useful.

Karl
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,781
Messages
2,569,616
Members
45,305
Latest member
KetoMeltsupplement

Latest Threads

Top