[TYPO3-core] RFC: minify JavaScript

Benjamin Mack mack at xnos.org
Mon Sep 17 05:38:40 CEST 2007


Hey Dmitry,

great idea. I like this very much. I see that this makes a lot of sense 
in the FE.
But: Aren't there other packager / compressor for JS that can compress 
the scripts more, stronger & better? (dunno)

Also it would be cool to have a classic cache system for this in the 
Backend like:

template.php: includeJSFile("typo3/tree.js");

and the script checks for a "typo3temp/js_min/tree_min.js" file in the 
temp directory, if it does not exist, it will create the minified 
version out of the original one.

It would then add
<script type="...." src="typo3temp/js_min/tree_min.js"></script>
(or something like that, something hashed) to the $JScode instance 
variable of template. what do you think?

--
greetings,
benni.
-SDG-

www.xnos.de // www.xnos.org


Dmitry Dulepov [typo3] wrote:
> Dmitry Dulepov [typo3] wrote:
>> Solution: use JSMin library (Expat (MIT) license, compatible with GPL) 
>> to minify javascript. Catch errors and return unminified script if error 
>> happens. It is safe because JSMin was around for ages and used by many 
>> products nowadays. Result is cached, so no real impact on performance.
> 
> Anyone else interested to review and give me +1 for this patch? :) I 
> will go with other scripts in the system than. This will really decrease 
> amount of scripts and speed up BE.
> 


More information about the TYPO3-team-core mailing list