Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!us.feeder.erje.net!newsfeed.fsmpi.rwth-aachen.de!news.mixmin.net!hq-usenetpeers.eweka.nl!81.171.88.15.MISMATCH!eweka.nl!lightspeed.eweka.nl!193.141.40.65.MISMATCH!npeer.de.kpn-eurorings.net!npeer-ng0.de.kpn-eurorings.net!newsfeed.arcor.de!newsspool4.arcor-online.net!news.arcor.de.POSTED!not-for-mail Content-Type: text/plain; charset="UTF-8" Message-ID: <41996123.0PhPILaA9k@PointedEars.de> From: Thomas 'PointedEars' Lahn Reply-To: Thomas 'PointedEars' Lahn Organization: PointedEars Software (PES) Date: Thu, 21 Nov 2013 16:15:08 +0100 User-Agent: KNode/4.10.5 Content-Transfer-Encoding: 8Bit X-Face: %i>XG-yXR'\"2P/C_aO%~;2o~?g0pPKmbOw^=NT`tprDEf++D.m7"}HW6.#=U:?2GGctkL,f89@H46O$ASoW&?s}.k+&. <13f4c8cf-1b52-41a5-8563-1a116f1491cb@googlegroups.com> MIME-Version: 1.0 Lines: 45 NNTP-Posting-Date: 21 Nov 2013 16:15:16 CET NNTP-Posting-Host: 39302017.newsspool2.arcor-online.net X-Trace: DXC=Y7QFEC2=m1:Tia]Ho99G50A9EHlD;3Yc24Fo<]lROoR18kFad[_6;h?KY?_Zgba4 X-Complaints-To: usenet-abuse@arcor.de Xref: csiph.com comp.lang.javascript:22099 nappysoft wrote: > On Friday, October 25, 2013 3:09:54 AM UTC-7, Robert Crandal wrote: Good morning, sunshine. >> The "head" section of my HTML file imports multiple ".js" files >> >> like this: >> >> >> >> >> >> ' ..... >> >> >> >> Is this the most common or best way to do this? I might want >> to import anywhere between 5-10 Javascript files (*.js) into >> one document. >> >> I'm just curious, because I'm still a newbie here. Thank you! > > If the scripts are static and loading the scripts is not conditional then > you should combine as many of the scripts into a single file. Developing > javascript for you web project using multiple files is a good way to keep > things separate during the development phase. During deployment (imho) it > is best to combine the scripts into single downloads.This also applies to > CSS files also. Caveat: Unfortunately, it is not Valid CSS (to the point of *not* *working*) for a stylesheet to have “@import” declarations that are not on the top. Any CSS compiler has to *parse* the stylesheets and take that into account. It is on the TODO list for my Resource Builder [1] already. Spare us those interleaved empty lines, please. _________ [1] -- PointedEars Twitter: @PointedEars2 Please do not Cc: me. / Bitte keine Kopien per E-Mail.