Index: openacs-4/packages/cookie-consent/tcl/cookie-consent-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cookie-consent/tcl/cookie-consent-procs.tcl,v diff -u -r1.2 -r1.3 --- openacs-4/packages/cookie-consent/tcl/cookie-consent-procs.tcl 18 Dec 2017 08:17:07 -0000 1.2 +++ openacs-4/packages/cookie-consent/tcl/cookie-consent-procs.tcl 22 Dec 2017 17:29:52 -0000 1.3 @@ -379,7 +379,12 @@ error "directory $resource_prefix/$version is not writable" } + # + # Do we have gzip installed? # + set gzip [::util::which gzip] + + # # So far, everything is fine, download the # files. "download_file" will raise an exception, when the # download fails. @@ -389,6 +394,13 @@ [dict get $version_info jsFiles]] { set fn [download_file $download_prefix/$version/$file] file rename -force -- $fn $resource_prefix/$version/$file + + # + # When gzip is available, produce a static compressed file as well + # + if {$gzip ne ""} { + exec $gzip -9 -k $resource_prefix/$version/$file + } } } }