[TYPO3-core] RFC: minify JavaScript

Martin Kutschker Martin.Kutschker at n0spam-blackbox.net
Wed Sep 19 09:27:26 CEST 2007


Benjamin Mack schrieb:
> Hey Martin,
> 
> Martin Kutschker wrote:
>> Nice idea. But I think that you can retain the original file name 
>> "typo3temp/js_min/tree.js".
> 
> Yeah, but what happens if an extension has a file named "tree.js" as 
> well?

Your original suggestion has no solution either :-)

 > I don't want to interfere with that, that's why we could create a
> hash out of "typo3/tree.js" which then would be stored in 
> typo3temp/js_min/MYHASH.js -- makes sense?

Unreadable. I think we could create a hash of the directory part and append 
it to the basename eg typo3temp/js/basemame_HASH.js. Or we could create 
really long names by using the "full path" and replace all /'s with _'s or 
-'s. eg typo3temp/js/typo3-tree.js

>> 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).
> That's right, the cached file will make trouble the first time after 
> you've upgraded to a newer TYPO3 version.

No. When a minimize file is not found it will simply be created.

> Maybe we should trigger a clearing of the js_min cache every time 
> somebody clears (what I call) the "System Cache" (clear typo3conf/ 
> cache), or at some other place?

Yes to the general idea. But I think we have no quite a number of caches in 
different places and it's getting hard for me to understand when which 
cache is cleared.

Masi


More information about the TYPO3-team-core mailing list