Add server-side gzip compression for images, CSS and JS files

One of the easiest ways to improve performance on a site is to gzip all static files, including images, CSS and JavaScript files. Most servers have the ability to gzip the files as they are served, preventing the developer from having to manually gzip all their files. Is it possible to enable server-side gzip compression on static files served from the FTP when served to web visitors?

  • Eric Oyler
  • Apr 13 2017
  • Reviewed: Voting Open
Area of the Product Other
Org/Company Name Alzheimer's Association
  • Attach files
  • Brad Abernathy commented
    October 06, 2020 19:02

    This deserves attention. It should be a setting on the FTP Server to allow gzipping for javascript. Support led me here despite gzip being allowed for some aspects - html and css. It was suggested in support that minifying js does the same thing and that's not the case. Both should be used, honestly, and you can see the reduction in file size by gzipping here: https://images.app.goo.gl/RPpP91gyEVr8hnNk6

    This is an example of (hopefully) a setting change on the ftp server and a huge improvement to orgs and user experience.

  • Eric Oyler commented
    May 15, 2017 17:41

    Nevermind. It appears the content-encoding is being set to gzip correctly. Just not sure why I'm getting errors from BugSnag about users having errors saying "Invalid Character" for my gzipped files. You can disregard my last comment.

  • Eric Oyler commented
    May 15, 2017 17:05

    Hey Ken,

    I am now finding that some browsers won't unzip my statically gzipped files and it's causing javascript errors. A quick google search says that the server needs to tell the browser that the content is gzipped. This is done using the content-encoding header. The server will need to supply this header with files ending in .gz.

    Is there any chance this could be done sooner than later, to support static gzipped files at a minimum. The automatic gzipping would be a great future enhancement. I create a support case for the static gzip issue as well to see if they can resolve this intermediate problem.

    Thanks!

    ~E

  • Eric Oyler commented
    May 02, 2017 18:43

    Thanks, Ken. I'm always interested in participating wherever I can be helpful. Please pass my info along to Kylee. Thanks!

  • Ken Cantu commented
    May 02, 2017 18:28

    Hey Eric, I've sent this idea directly to Kylee Long who is the PM working on Assets for LO Beta right now. She's also looking for orgs like yours to do discovery with if you are interested.

    Just let me know and I'll make sure she is aware of your interest. Good idea either way.

    Thanks,

    Ken