[TYPO3-core] RFC: #16647: Prevent compress of scripts that use ajax.php

Jigal van Hemert jigal at xs4all.nl
Sat Dec 4 14:31:05 CET 2010


Hi,

On 4-12-2010 12:47, Steffen Kamper wrote:
> it's up to you to decide that it's dynamic, in your case use
> /path/to/script/file.php?dynamic
>
> Facit: either take this fix or rewrite compressor jsfile method.

Sorry, but I'm trying to understand why there has to be some kind of 
intelligence in the compressor. The t3lib_PageRenderer::addJsFile() 
method has a parameter to enable/disable compression.

The problem I see with the added intelligence is that it takes the wrong 
decision and you're unable to override that decision.

Maybe it would be a good solution to have a default "auto" option.
Just as an example:
t3lib_PageRenderer::addJsFile($file, $type = 'text/javascript', 
$compress = 2,...)
0 : no compression forced (compatible with FALSE)
1 : compression forced (compatible with TRUE)
2 : auto compression (default)
(preferably done with constants)

If somehow autodetection seems to take the wrong decision it can be 
corrected (while keeping room for whatever kind of wild ideas for 
compression settings in the future)

-- 
Kind regards / met vriendelijke groet,

Jigal van Hemert
skype:jigal.van.hemert
msn: jigal at xs4all.nl
http://twitter.com/jigalvh


More information about the TYPO3-team-core mailing list