HelPHP

minify.php

Table of Contents

Functions

minify()  : string|files
Minify an instance : Take all js files to create only one js.gz file the same for the CSS theme.
writeUTF8File()  : mixed

Functions

minify()

Minify an instance : Take all js files to create only one js.gz file the same for the CSS theme.

minify(string $target) : string|files

At the end you'll get only two small files instead of 30/40~ and with a size reduced by ten. of course the impact on speed is huge and as the number or http queries is reduced the server ressource are increased by 20 ~ !

After minifying, you just need to swith DEVMODE to false in your main config file to see the difference.

it's common practices to keep one version of the instance as a dev version and the second as production.

in that case you just need to move css/gz/* and jsgz/* files from dev version to prod + database

Parameters
$target : string

the home path of the instance to get config

Return values
string|files

echoing results of minification.

writeUTF8File()

writeUTF8File(mixed $filename, mixed $content) : mixed
Parameters
$filename : mixed
$content : mixed

        
On this page

Search results