Jump to content

FANTASTIC internet javascript control Tweak (IE)


Recommended Posts

Everybody knows how bloated and resource-sucking are javascripts on some websites. The more famous the website, the more junk they put in it.

Javascripts, because they are poorly coded and redundant are responsible for most of the slowlyness on the internet.

Sometimes it can be a true nightmare. They can even freeze your browser and let you wait forever unless you hit Ctr+Alt+Del.

The radical solution to this is creating the followin key value in the registry:

HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Styles\MaxScriptStatements

If the "Styles" key is not there, create it too.

The "MaxScriptStatements" must be a DWORD type. (in regedit click "new"-->"DWORD value")

Enter a number between 10000 and, say, 50000. (in regedit rightclick on the MaxScriptStatements value and click "edit", select "decimal", enter the number of your choice)

This value means that after a certain number of javascript statements (commands), a warning pops up asking you to abort the script or to let it run.

The lower the number the more often the warning pops up. Setting it too low might be annoying.

I set it to 10000 and on some sites it's ok, but here, the forum became unusable so I may want to set it higher.

As for comparison, in absence of any entry, the default value is 5 million, which is simply insane.

Most of the time you can abort the script and it has no effect whatsoever on the content or even the functionality of the page, contrary to disabling scripts alltoghether.

You can let it run when you think it could be useful, eg: when the page has is not yet displayed completely because some content may be script generated. At the very worse, you refresh the page.

With this tweak browsing becomes all of a sudden a true pleasure. No more browser hanging up.

Pages appear almost instantly. If a script threathens to freeze your PC, it's at the mercy of your finger! You are back in control!

Thanks to JarC from the Maxthon forum.

Edited by Fredledingue
Link to comment
Share on other sites

For Firefox, the closest I could find: 1 2

I changed dom.max_script_run_time in Firefox from the default 10 [secs] to 1. As a result I got a lot of msgs "Warning: Unresponsive Script". Is there a setting in Firefox which suppresses this msg, it's a nuisance to click on "Stop Script" continuously.

A good (or rather bad?) test example of a slow-loading website, probably because of tons of advertising scripts, is www.nzz.ch

Script-heavy websites load slowly mainly on my 10-year-old 700 MHz laptop with 512MB RAM, much less on my dual core with 1250 MB RAM.

Edited by Multibooter
Link to comment
Share on other sites

For Opera, I didn't find anything, but that doesn't mean there isn't. :)

Maybe :unsure:


ECMAScript Available memory for JavaScript engine in kB

Just for the record, original MS KB is here:


A confirmation for Firefox :thumbup :



Link to comment
Share on other sites

Multibooter, www.nzz.ch is not bad at all as far as I'm concerned.

FYI I set MaxScriptStatements to 50,000 (20,000 was way too low) and this website didn't trigger any warning.

But I get cascades of warnings on this very website, MSFN.org, which before caused me a lot of trouble. I can even say that MSFN.org is the worse website as far as javascript statements are concerned. (I'm going to write a complain in the had oc forum soon.)

This is about javascript statements not javascript duration (time out), which are two different things.

Time out is perhaps more effective since it blocks what realy takes time while statements block large piece of code which are not forcibly slow. The statements setting does take in account loops, so it counts the number of statements executed and not merely the size of the script. So it's not minding real execution time but close to it and most importantly avoid hang-ups.

Sometimes the statements setting fails to block slow codes (few statements but slow stuffs) maybe because it's waiting information from slow servers. I'v read that's sometimes the case.

In this case a time out could be more helpful.

It's amazing how much javascript crap some websites can contain. First because killing the long scripts while they run almost never change anything on the page and doesn't even change the functionaly of the page.

Secondly because 50,000 statements is huge. Imagine, by 10 statements per line, you get a 5,000 lines script! Oh My God! And this is happening several times on a single page!

Worse yet if the coder imagined loops which could run in the hundreds or in the thousands. This means realy bad encoding and even disrespect for the users at this point IMO.

Edited by Fredledingue
Link to comment
Share on other sites

Multibooter, www.nzz.ch is not bad at all as far as I'm concerned... I can even say that MSFN.org is the worse website as far as javascript statements are concerned.
Both website are on my favorite top-10 list, great content. msfn.org works fine even if JavaScript is turned off (I made this posting while JavaScript was off). To post at the www.nzz.ch forum I have to turn JavaScript on unfortunately.

JavaScript is one of the greatest threats to privacy. With JavaScript on and Flash Player installed, Big Brother Adobe may be watching and logging activities. There may be some control over what is communicated by customizing one's personal Flash Player preferences stored on Adobe's computers, accessible at http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager05.html There is no need to log in, they already know who you are.

"If you select Always Deny and then confirm your selection, any website that tries to use your camera or microphone will be denied access. You will not be asked again if a website can use your camera or microphone. This action applies both to websites you have already visited and to those you haven't yet visited." http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager02.html

Perhaps the expense incurred for providing a free player is made up by revenue from the Big Brother in government. A free honey pot for everybody, thanks to JavaScript.

Edited by Multibooter
Link to comment
Share on other sites

More specificaly it's activeX which is dangerous for you. Not only a threat to your privacy but for you PC too.

ActiveX can be desactivated separately from javascript. but disabling javascript will disable activeX too because it can't work without javascript.

I always disable activeX while leting javascript on. As a result, I'v never caught any virus, never been hacked.

But I also never watch YouTube videos because Flash needs activeX to work.

The YouTube video format is the single most dangerous thing on Earth, I mean on the internet, because it forces millions of poeple to be exposed to activeX threats. Instead of avi, mpeg or wmv formats which can be downloaded safely.

Yes this forum can be used without javascript and it's great because with it it's terrible. For example, every time I click or right click on the text area, the warning message pops up 2 or 3 times! That means that everytime you click on it scripts totaling more than 150,000 words are triggered!

And these scripts are... useless! No necessity whatsoever.

And I'm talking about the "Fast Repply" form! :shock:

Websites requiring javascript to post on their forum are checking the datas before they are sent to the server. This can be useful and may offer a gain of time to the user. Because if it's checked on the server the user had to wait the response and the page refresh. If it's checked by javascript it's processed on the user computer and the response comes instantly.

But not every site need to check text datas.

Edited by Fredledingue
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    • No registered users viewing this page.

  • Create New...