Re:JavaScript loader comparison
by Jencha on Tuesday March 08, 2011 @06:43AM
(#2300572)
Umm, actually you can revert to previous versions.
Google docs saves revisions of every edit: File -> Show Revision History (Could be slightly different, because i translated them from my localized google docs)
Re:JavaScript loader comparison
by bokchoi on Tuesday March 08, 2011 @11:51AM
(#2301549)
It's good to see lots of script loaders. It's interesting that CommonJS modules aren't more widely supported in that list of loaders. Here are some more CommonJS loaders:
Re:JavaScript loader comparison
by Hovertruck on Tuesday March 08, 2011 @04:50PM
(#2302724)
It depends on what you're working on and how often it changes. If you have 8 JS files that are one single script in production, every time you change anything in any script, the user has to re-download the whole thing. If the scripts remain separate in production a change to one does not invalidate the cached versions of the others, so they don't have to be re-downloaded.
Again it depends on the sizes of the files and how often they change, but ideally you could define your core JS that would be loaded first, and then asynchronously load the rest of the JS that might not be needed, or at least not be needed on the initial page load.
http://www.peterbe.com/plog/requirejs-vs-headjs
(in the end I decided to use HeadJS but just the loader)
But a vandal could easily just delete the contents of this and save it, leaving no trace.
Google docs saves revisions of every edit: File -> Show Revision History (Could be slightly different, because i translated them from my localized google docs)
http://wiki.commonjs.org/wiki/CommonJS#Implementations
ECMAScript modules can't come soon enough.
http://brendaneich.com/2011/01/harmony-of-my-dreams/#modules
Again it depends on the sizes of the files and how often they change, but ideally you could define your core JS that would be loaded first, and then asynchronously load the rest of the JS that might not be needed, or at least not be needed on the initial page load.