[TYPO3-core] RFC: minify JavaScript

Martin Kutschker martin.kutschker-n0spam at no5pam-blackbox.net
Mon Sep 17 22:15:52 CEST 2007


Benjamin Mack schrieb:
> Hey Dmitry,
> 
> 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.

Nice idea. But I think that you can retain the original file name 
"typo3temp/js_min/tree.js".

> 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?

Why a hash? Or better, a hash based on what? rtehtmlarea uses hashes 
with its own version number to avoid browser cache problems. Hm, maybe 
we could use the TYPO3 version number for it (as default).

Masi


More information about the TYPO3-team-core mailing list