Gzip for html pages with no file extension


#1

Hi everyone,

I’m confused about how to set up a new gzip rule. Are the Extensions and Content Type AND’ed or OR’d together? The specific problem I’m seeing is that while everything else seems to be gzipped correctly, my html pages, which do not have file extensions (for example http://www.mysite.com/dashboard) do not seem to be getting compressed. My guess is that it has something to do with the missing file extension even though it’s content type (text/html) is in the content type list. Can anyone shed a little light on this?

Thanks!
Joe


#2

Hey Joe – the default conditionals for our gzipping are an “or” style logical operation, so the content type without the explicit file extension should be gzipping.

Are you testing this via curl or a browser? If you’re testing via curl, make sure you send the --compressed flag in the command. If you’re testing with a browser and still not seeing compression, our support team probably needs to take a look at the full request and your service.

If you’re not comfortable putting that information in the forum, you can send an email to support@fastly.com with a link to this topic and we can start debugging from there.


#3

Hi aspires,

Well, as usual for me, right after I complain about something online, it seems suddenly start working. I was using Chrome to test and was pretty sure I was not getting Content-Encoding: gzip in my response headers, but I definitely am now. Perhaps it just tool longer than I expected to propagate.


#4

What could have been happening was the original response was being cached without the Accept-Encoding handling that you deployed. If this happens again with a different URL, purging the object may fix the problem.