Category Archives: linux

How to speed up page rendering?

Today just a shorty: Enable gzip!

When using php set output_handler = ob_gzhandler. So every php request will be compressed.

Also you can use the defalte module of you apache2. In that case javascript, pure html and css will also be compressed.

  • activate the module a2enmod deflate
  • add some lines to you configureation (vhost or globle whatever you want) (global in this case)
    <Location />
    <IfModule mod_deflate.c>
    AddOutputFilterByType DEFLATE text/html text/plain text/xml text/php text/css text/js text/javascript text/javascript-x application/javascript application/x-javascript text/x-js
    </IfModule>
    </Location>
  • Don’t forget to restart the server! Do not just reload the configuration!

PS: To check the content-type on a linux command line of a web page try
lynx -head -dump http://www.google.com
PPS: Website to check the state of compression: http://www.gidnetwork.com/tools/gzip-test.php

Putty with utf8 on a SuSE System

When you change the default translation of your Putty to UTF-8 you can use all the advantages of that. But there is one thing witch is strange. If you call YAST you’ll see wired characters instead of the normal lines.
Of course you set “Handling of line drawing characters” to “Use Unicode line drawing code points“. But you need to do one more little thing.
Set “Connection->Data->Terminal-type string to” “linux” instead of the default “xterm” und you’ll be happy again!

Cron sends no mail to MAILTO address

When you are using cron to do some automatic jobs and want the output to be mailed, be sure you are entering the mail address in the right format. In this case it means that the mail address must not contain an “_” (underscore)! If you enter into the MAILTO env of the crontab a mail address which contains an underscore you’ll wait forever 😉
Of course this behavior depends of your cron version …

So don’t use an underscore when ever you are able to do.