<?php $path = './js/combine'; $file = $path . '/' . $_REQUEST['q']; $content = ''; if (file_exists($file)){ $content = file_get_contents($file); //$content = gzencode($content); //$content_type = 'text/javascript'; $content_type = 'application/x-javascript'; header('Content-Type: ' . $content_type.''); header('Content-Transfer-Encoding: none'); header('Content-Length: ' . filesize($file)); $offset = 432000; header('Expires: '.gmdate('D, d M Y H:i:s', time() + $offset) . ' GMT'); $etag = md5_file($file); header('Etag: '.$etag); echo $content; } ?>