# Netscape 4.x has some problems... BrowserMatch ^Mozilla/4 gzip-only-text/html # Netscape 4.06-4.08 have some more problems BrowserMatch ^Mozilla/4\.0[678] no-gzip # MSIE masquerades as Netscape, but it is fine # BrowserMatch \bMSIE !no-gzip !gzip-only-text/html # NOTE: Due to a bug in mod_setenvif up to Apache 2.0.48 # the above regex won't work. You can use the following # workaround to get the desired effect: BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html #AddOutputFilterByType DEFLATE text/css AddOutputFilterByType DEFLATE text/javascript AddOutputFilterByType DEFLATE application/x-javascript Header append Vary User-Agent env=!dont-vary TODO : Faire en sorte que la compression ne se fasse qu'une fois grâce à un cache de fichier */ header('Content-Type: text/javascript'); $path = './js/combine'; $file = $path . '/' . $_REQUEST['q']; /* Envoi simple du fichier*/ if (file_exists($file)){ $content = file_get_contents($file); echo $content; } ?>