When users visit my website without javascript it works just like any other. When they visit with javascript, and a certain function works, only the very first page gets loaded as HTML, all the other requests update that first page using asyncronous javascript. The method can save me about 90% processor and bandwidth resources per hit on most pages. The same functions that have already been assigned to certain areas stay assigned, and in some cases even when the children of that element has been changed. 10 seconds after a request is made another is made that comes from a timer. This checks to see if the data has changed at the server, and if it has sends it to the current page with javascript.

So my question is this. With asyncronous and syncronous websites what is the best methd for conserving memory clientside. As the javascript state stays live throughout the whole session I'm worried that if the users leaves the window open for a while the browser might get cluttered with script.

Variables that aren't needed for the whole state have been undeclared, instead of using var a=int I've started using a=int, delete a

Can I do the same with functions? Are there any other ways I can reduce the amount of storage their browser is using for javascript variables and functions.

Also, what things can be done to improve rendering time. Any tips on faster javascript execution?

One last thing. The javascript files are caching in some browsers, even when a no-cache header is set. So when they are called again without the browsers state changing they are just executing the same javascript again. Is it because those browsers are waiting for the window to be closed to clear the cache? I've got round this by adding a unix timestanp to the request that calls the javascript but I'm thinking now that these may stay in the browsers memory until closed. This might clog it up even more.

Any tips and tricks greatly appreciated. The more I optimize what happening in the clients window the more I can make happen