Also I noticed that some compressors just eliminate all spaces, tabs and new lines from text, is that a good way to compress anything?
Configure your webserver to serve files with gzip compression. Also make sure that it sends Etag and expiry headers, so the client is able to cache the script.
Thanks, but I'm not shore that I know how to do those things, is there a book or site that explains that things?
Assuming that you're using Apache as webserver, you can use mod_expires to make sure that your files are cachable by the client, and mod_deflate to apply gz compression on the files, during transfer. The modules should be loaded in Apache's main configuration file (httpd.conf) and can then be enabled in a a per-directory config-file (.htaccess). If you're not running your own server, you may have to ask your host for help on this, but it's fairly default.
Older versions of Internet Explorer may have some problems with mod_deflate. See this post, for a workaround for those browsers: