digital-analytics-program / gov-wide-code

Provides a set of javascript files and documentation to implement web analytics on US federal websites
http://www.digital.gov/dap
104 stars 55 forks source link

Enable content-encoding (gzip/brotli) for JS files #62

Closed mattbrundage closed 5 years ago

mattbrundage commented 6 years ago

The DAP GA JavaScript files served from https://dap.digitalgov.gov/ are currently being served uncompressed. Turning on gzip or brotli would be a quick win.

Further info: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Encoding

konklone commented 6 years ago

:+1: Yes, this should be an easy win.

konklone commented 6 years ago

Note it's only 20K, but yeah, Google's pagespeed scanner suggests that gzip would reduce the size by 74%, down to ~5K.

tdlowden commented 6 years ago

Thanks for this!

mattbrundage commented 5 years ago

DAP is now gzipping the minified file. Thanks for that. Looks like this fix is documented in commit 8e4e5965145dbbfd3c1fef4bf91cb0f16c9aec3a