Compression works when CF caching OFF; fails when CF caching ON

With CF “normal” (i.e. Development Mode is OFF – NOT bypassing CF caching), Google Page Speed Insights (GPSI) reports that compression is NOT enabled (specifically, for 2 js files). See the “Opportunuties” section of this image:

However, when I set CF to Development Mode (i.e. bypassing CF caching), GPSI reports that compression IS enabled. Specifically, “Enable text compression” is listed under the “Passed audits” sections. See image:

Note: all I’ve done is turn CF Development Mode on & off. These results are for the mobile version of the webpage https://www.emailsanta.com/template-2019a.asp hosted as an Azure web app.

QUESTION: How do I get CF to compress files without “permanently” running it in Development Mode?

I’ve searched the CF Community and googled the issue but to no avail.

Merry Christmas,

A Stumped Santa

Right now development seems to be off (respectively, caching on) and it seems as if the resource is compressed via brotli.

image

Merry Christmas Elf Sandro!

Thank you for the insight! I’ve just turned development on (i.e. caching Off) and changed the web.config file and all seems fine (except that it’s in development).

Turning development Off (i.e. caching on) GPSI showed that compression was off and that a .js file should be minified. However, when I tested again, the .js file warning was gone. Perhaps I retested too quickly.

Digging thru old files, this seems to have become an issue back in June/July. That is, GPSI wasn’t showing the need for compression when Development was Off. Sorry no screen shots. I can’t see anything I might have done back then in my notes.

FWIW, I just checked the GPSI desktop results as well. GPSI desktop doesn’t show compression as an “Opportunity”. It is listed under the “Passed Audits” section but notes potential savings of 99kb – exactly the same as the Mobile test.

I’ll leave development Off (i.e. caching on) for now.