I have my javascript in a PHP file with the following code at the top of the file. The idea is to make the browser cache the javascript and gzip it so that it won't get downloaded one very page view, but when checking the Web Inspector, it is returning 200 instead of 304 and appears to be re-downloaiding the file on every page view.
<?php
@ob_start ("ob_gzhandler");
header("Last-Modified: Mon, 05 Nov 2010 01:00:00 GMT");
header("Expires: ".gmdate("D, d M Y H:i:s", time()+2592000)." GMT");
header("Cache-Control: max-age=2592000");
header("ETag: \"9097158e797a93a8e213c6c5c72a2a7c\"");
header("Content-type: application/x-javascript; charset=utf-8;");
?>