

This is usually a side effect of JavaScript taking longer than the browser expects and it's probably worthwhile letting them continue to try for awhile.

Dear, Leo. I use both Firefox and Chrome. Often, I get the message, "The following script is busy. You can either continue or stop." And in the top, it shows "Firefox's not responding." In Chrome, I get the message, "The following pages are unresponsive. You can either kill or continue and the system hangs. What could be the reason? Is it something to do with my system?

In this excerpt from Answercast #55, I look at "not responsive" errors in browsers, typically caused by JavaScript.

Is it my system?

Typically not. This is usually the side effect of how a web page has been written and what it's trying to do.

Now the script that it's referring to is typically JavaScript. A good example of a page that relies heavily on JavaScript in ways that can result in this kind of behavior are things like Gmail or Facebook. Facebook's a great example.

JavaScript errors

So what happens is when you load up a Facebook page, it actually is running a lot of JavaScript on your computer to lay things out. And more importantly, to get updates as they happen without your having to refresh the page.

Now, what Firefox and Chrome are detecting here is that the JavaScript is simply running for a long time. Longer than the programs would like it to.

What normally it expects is that the JavaScript will do something and then finish. It will do something; it will finish; it will get an update. It will display the update and it will be done. Then a few seconds later, it will get the update; it will display the update; and it's done.

If for some reason the JavaScript takes too long (where "too long" is some random number defined by the different browsers), then the browser will complain and say, "You know what? This script that's running... it's taking too long. It's unresponsive."

Wait or kill

So at that point, you have two possibilities.

You can say, "Well, okay," and wait for the script. Maybe it really is taking too long on purpose. Maybe it really is doing something valuable.

On the other hand, you can say, "Nope, I'm impatient. Kill the script. Let's get on with our lives."

Long scripts

Now, there are scenarios where it actually, very legitimately, can take too long. I see it all the time and quite frankly, I'll usually let a script continue to run - because it's usually because of a very benign (and very common) reason that it's just taking longer than normal. An example: again, Facebook.

When the script is out there it's basically going out to Facebook and asking, "Is there something to update?" If there is, I'll get it, I'll display it, and I'll wait a few seconds; and then I'll go back for an update, I'll display it, and wait a few seconds.

No response

Now, what happens if when that script starts, it asks Facebook, "Is there an update?" and it doesn't get a response?

Well, it waits for the response. The script is still running, but the script is waiting for a response. If it waits too long, then your browser says, "Hey, this script is still running. It's unresponsive."

The script is very legitimately waiting for something but that "something" is simply taking longer than it normally does. It may be the case that the response will come back from Facebook that says, "Yep, here's some data to be updated." And the script will continue on; it will carry on. It will grab the data; it will display it; and so forth. It just took longer than normal. Long enough that the browser seemed to care.

What to do?

So, there's really no one size fits all answer for this.

Sometimes, scripts simply take longer than the browser expects them to. Therefore, you get this particular message to basically give you the option of killing what might be a hung script.

It might not be; it might be something very valid, but there's no easy way for you and I to tell.

My advice is to let it wait.

It'll complain again... if the script stays unresponsive, the browser will complain again. If it complains a second time then, you know, yea, I might go ahead and kill it. But for the most part, I've seen enough things (especially with these kinds of online interactive updating kinds of scripts, that you do find in sites like Facebook and Twitter and Gmail and so forth) that sometimes things just take longer than you expect and it's probably worth it letting them continue to try for awhile.

If you get fed up... Sure, go ahead and kill 'em.

Article C5847 - September 24, 2012 « »

Share this article with your friends:


Not what you needed?

September 25, 2012 11:47 AM

That's good to hear (that this is usually benign) however I also get a warning that my computer will become unresponsive if i let the script run and sometimes, it indeed freezes and I have to restart. So, although there doesn't seem to be any damage done, I either tell is to end the script or leave the page while I still can.

October 2, 2012 5:04 PM

I have been haunted by the URS 'Unresponsive Script' for over TWO years. Never from IE, just Firefox. I got NOSCRIPT and it made no diff at all. I turned off NOSCRIPT, SOS! Minutes before the URS, the system slows to less than a crawl, taking MINUTES to scroll a page or even a line. CPU is at 100% with Firefox taking between 80 and 95%. Its committed RAM is usually 450MB with 250+MB WSS. I got CHROME recently and rarely get an 'unresposive page' message. With NETMETER running, I can see that my Time Warner 10Mbs cable gives me less than dial up speeds, about 1000 to 7000 bits/sec! When I cancel the URS in Firefox, another pops up, always a diff script. H E L P !!!

Comments on this entry are closed.

