1. minify css/js.
easy way to minify files when serving, use minify (http://code.google.com/p/minify/) will help.
setting minify
- download minify and decompress it.
- go to min directory and open to edit config.php
- delete comment(//) in line 47
- upload "min" directory to top directory.
- set that directory's permission to 707.
- make directory in "min" dir, make its name to tmp
setting rewrite
- if you're using Apache web server, add it in .htaccess like :
" RewriteRule ^(.*\.(css|js))$ /min/index.php?f=$1 [L] "
- else if you're using nginx web server, add it in virtualhost configuration file like :
" rewrite ^/(.*.(css|js))$ /min/index.php?f=$1 last; "
if you're done, the tasks are finished, too.
2. enable gzip compression.
- open ./classes/display/DisplayHandler.class.php and replace line 15 like :
" var $gz_enabled = true; "
done.
3. enable caching
when using XpressEngine without cacheing, you can see the terrible speed of your site.
set page caching time at least 1~2 minutes. It will help to improve your performance of your site and server load too.
4. use zlib.output_compression
- open ./config/config.inc.php and replace line 100 to :
" define('__OB_GZHANDLER_ENABLE__', 0);
ini_set('zlib.output_compression', 'On');
ini_set('zlib.output_compression_level', 6); "
- add " ini_set('zlib.output_compression', 'Off'); " in ./modules/file/file.controller.php after line 117