Considering you have go-daddy, you might not have decent apache access. Use PHP and use the following template.
<?php
$compression_level=2; //any number from 1 to 9 depending on how much compression
ob_start();
// INSERT YOUR OUTPUT CODE HERE
$data=ob_get_contents();
ob_end_clean();
if (strpos(strtolower($_SERVER['HTTP_ACCEPT_ENCODING']), 'gzip') !== false){
$data=gzencode($data,$compression_level);
header("content-encoding: gzip",true);
}
echo $data;
?>
What will happen here is a buffer is created which holds all output. After that, the buffer is stored as a variable. Then it checks to see if the client can support gzip decompression and if it does, then compress the code and result is in compressed format and send the gzip header along with the compressed data back to the client.
This code also returns normal uncompressed output for those with browsers that can't support gzip encoding.
Once that is done, you can either make reference to the PHP file directly in the HTML code, like this for example:
<link rel="stylesheet" href="http://www.whatever.com/css/css.php">
Or if you want to make the filename look pretty, look up the RewriteRule command for mod_rewrite. There's lots of examples on the net for that.
Header
directive should be on a line by itself, but are you really varying the header based on the User-Agent?