ã > The Synchronet webserver reuses the same JS context across multiple requestsã > from the same client. It can take a few minutes for the client's session toã > expire and a new context to be created. So basically you may end up reusingã > the same global scope across multiple executions of a script.ãã > So using 'const' at the *top level* of an XJS/SSJS script is inadvisable.ã > Use 'var' instead.ãã > It's okay to use 'const' inside of functions.ãã > It's probably also okay to wrap your entire script in an IIFE so that youã > get a fresh scope for each request. However, this context reuse was doneã > for performance reasons, so you'd be sacrificing any performance gain byã > doing that.ãã > (function () {ã > // This is an IIFEã > // It's an Immediately Invoked Function Expressionã > })();ãããExcellent, thank you!ãããMy doctor said I have the body of a 25 year old ... and the mind of a 10 :-/ãã---ã þ Synchronet þ AlleyCat! BBS -
http://alleycat.synchro.net:81ã