Path: csiph.com!weretis.net!feeder4.news.weretis.net!feeder1.news.weretis.net!news.solani.org!.POSTED!not-for-mail From: Thomas 'PointedEars' Lahn Newsgroups: comp.lang.javascript Subject: Re: Node.js Date: Mon, 16 May 2016 22:20:28 +0200 Organization: PointedEars Software (PES) Lines: 39 Message-ID: <13691380.NLzAtpMErn@PointedEars.de> References: <662bb095-fcbf-4eea-a597-07d07a7975e9@googlegroups.com> <7fab549c-269c-49ab-9b8d-45c30860f0f4@googlegroups.com> <2f390f05-400c-4d34-9e65-d5a066daaaed@googlegroups.com> <5lujjbdjstq25ar3hq92nvvlh6cpq73vif@4ax.com> Reply-To: Thomas 'PointedEars' Lahn Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8Bit X-Trace: solani.org 1463430029 25343 eJwNyskBwCAIBMCWorArlMMh/Zdg5j0QLtZRgorBpHuBvHD1lOiveKzC5k8bu2WEfddOj2tMfR6AEUs= (16 May 2016 20:20:29 GMT) X-Complaints-To: abuse@news.solani.org NNTP-Posting-Date: Mon, 16 May 2016 20:20:29 +0000 (UTC) User-Agent: KNode/4.14.2 X-User-ID: eJwNyMkBwDAIA7CVoI4xGScH7D9Co6eI8DgawRhs9rDCFPc7GRJesmguz7VSL6Hv8lZVCsZ5QjW6nNgwl34wkhSK Cancel-Lock: sha1:iIYI5inNvgI5TO3CzP5+PprNX+0= X-NNTP-Posting-Host: eJwNy8ERACEIBLCWZIGFKwfx6L8Enck3rhR2GJ3m4zOA717HvkdMVzY3MjqqVPsMhPUjs/eLigsW2xDI Xref: csiph.com comp.lang.javascript:30448 Tim Slattery wrote: > jonas.thornvall@gmail.com wrote: >> Are all .js files serverside "executed on server", i want clientside >> "browser executed" javascript but i want to split the code/script >> over several files, is that possible? > > All (or nearly all) javascript is shipped to the client and executed > there. You can have various chunks of code in various *.js files on > the server, so long as the HTML page references all of them. There are no “HTML pages” (this is an outdated concept that has always been underdefined at best), and *client-side* script resources can now be loaded *on demand* in a reliable, non-blocking, and standards-compliant way. [1] (If ECMAScript implementations in Web browsers would also implement the “export” and “import” features of ECMAScript 2015, we could be writing script modules and have them loaded implicitly now instead of through RequireJS [2] and similar libraries. [3]) Since the References header field is borken, presumably because Google Groups borked the Message-ID, I cannot see if and how this pertains to Node.js, which is a *server-side* environment based on Google V8 JavaScript in that regard; Node.js modules are *never* “shipped to the client”. [4] The OP should read the FAQ and learn “How To Ask Questions The Smart Way”. The author of the precursor should read the FAQ, STFW, and update their knowledge base before giving further advice. __________ [1] [2] [3] [4] -- PointedEars FAQ: | SVN: Twitter: @PointedEars2 | ES Matrix: Please do not cc me. / Bitte keine Kopien per E-Mail.