If you have any feedback, suggestions of improvements for this thread, please post them in the community feedback thread.
The ECMAScript Standard:
(Authored for implementors, not users. Very hard to read unless you know and understand the technical language it uses.)
(Microsoft implementation, see MSDN/Scripting/JScript)
(Safari & Konqueror implementation)
Standard host objects, DOM0 & Netscape 4 proprietary host objects:
(MacroMedia flash implementation and host objects)
(iCab implementation and host objects)
The Document Object Model - DOM:
Documentation on Specific Features:
Document Bindings/Behavior (Two separate Mozilla and Microsoft technologies that might be united in some form in CSS Level 3)
Various, often specific task related:
W3C Technologies Resources:
Now, tell me: Did I miss anything?
(PM me with suggested additions, if you have any)
[cut off part from another thread]
Global variables eat memory - local variables exist only as long as the function survives, unless they are in some way referenced from somewhere else. (Mostly the objects that has been created using the function, gíven the function is a constructor.)
Every extra action you have to take - including climbing the scope chain and calling a function - consume processing power. You gain load speed and readability from splitting up in smaller functions, especially if they are called from many places.
Do..while is faster than while is faster than for is faster than for..in. Sometimes a function calling itself is faster than an iterator, sometimes not. Seems to depend on function complexity - the more complex the more gain. If you can keep a loop shorter than a function, use that instead.
setInterval is better than setTimeout. Neither is good.
Don't ever use eval, Function constructor or RegExp constructor if you can avoid them. They are big hogs all of them.
Use break and continue in loops if they perform an action you might be interested in. It's often better to loop through everything and jump what you don't want to handle than to set a more complex expression in the condition of the loop.
Use labled blocks and breaks for complex execution handling. It may be spaghetti, but it's fast.
Minimise actions inside loops. For instance, never use collection.length inside the condition if it's static during the loop - store it in a variable instead.
Thanks for Your outstanding answer, liorean!
Most subjects I am aware of / understand, however I will dive in the iternary operations structures to know more of it.
One question for now, what's Your advice on the amount of used global variables, maximum 50, 100,...... Because it's so easy to have all my div.id's directly to play with.
Use as few as possibly. Create one or just a few holding object containing the variables you want as properties instead.
Also, if you declare a variable inside a function instead of globally, it will exists only so long as the function, so that's a good way of avoiding global variables.
Never use MSDN for information about anything non-MS-proprietary. If you look up a standard property MSDN will tell you how IE implements it, which may or may not be how it's supposed to be implemented, but MSDN never distinguishes. Therefore its information with regard to anything non-MS is unreliable.
<nb>I'm not MS bashing here .. simply passing on advice because I value integrity of information ... and I've been embarrassed too many times ;)</nb>
For MS-proprietary information it's second to none, but it's search facility is not so great; Google Site Search is much more reliable: "site:msdn.microsoft.com your search words"
Just made a cleenup of blind links and made some additions. (Thanks, everyone reporting those blind links and suggesting additions.)
I'm also looking for some way to bring the structure of this list to a level that makes it easier for newbies to find what they are searching for in it (Currently it's more targetted at people already familiar with the languages and it's construction and abilities). If you have any suggestions, PM me.
(I like to keep this thread absolutely on-topic and relevant)
IE: where's my memory? by mishoo, 8/23/2004
|All times are GMT +1. The time now is 07:45 AM.|
Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.