saucecontrol / Brotli-IIS

Brotli Compression Scheme Plugin for Microsoft IIS 7+
MIT License
47 stars 8 forks source link

Installed but some weirdness #4

Closed AcidRaZor closed 5 years ago

AcidRaZor commented 5 years ago

Hi, was wondering if you could help.

I followed all the instructions, however, it would seem that if I access my website from outside the server environment, I don't get the correct Content-Encoding (none in fact)

When I use a browser on the server itself and then visit the same site (same browser using the FQDN over https), the Content-Encoding shows up.

Did I miss something in the config?

saucecontrol commented 5 years ago

Nothing jumps out at me based on your description. I'd suggesting checking the request headers sent by the browser in the remote case to make sure accept-encoding is being sent. Otherwise, unless you have a URL rewrite rule that has something IP-based in it, everything should be the same local or remote.

AcidRaZor commented 5 years ago

That's just the thing, the request headers has accept-encoding: gzip, deflate, br

The only rewrite I have is for React Router, but it's not IP based since we host a few sites on IIS there:

<rule name="HTTPSRedirect" stopProcessing="true">
                    <match url="(.*)"/>
                    <conditions>
                        <add input="{HTTPS}" pattern="off" ignoreCase="true"/>
                    </conditions>
                    <action type="Redirect" url="https://{HTTP_HOST}{REQUEST_URI}" redirectType="Permanent"
                        appendQueryString="true"/>
                </rule>

                <rule name="ReactRouter Routes" stopProcessing="true">
                    <match url=".*" />
                    <conditions logicalGrouping="MatchAll" trackAllCaptures="false">
                        <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
                        <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
                    </conditions>
                    <action type="Rewrite" url="/index.html" />
                </rule>

But that still won't explain why it works on the local machine when requesting vs remote not working. Highly annoying tbh, been at this issue for a day now :/

AcidRaZor commented 5 years ago

It does seem from tests from other websites (like pingdom tools) that the compression is working. I just have no idea why it's not working from my laptop then. I'll test on a colleague's machine to see, I need to run Lighthouse for performance checks. Guess I'll run it on the server... I just need to be 100% if it serves correctly to everyone (especially on mobile where speed is key)

If you could check from your side, it would be brilliant: https://react.heycarter.com/Cars/Audi/A3/cabriolet-40TFSI-S-line/AudiA33fo6

saucecontrol commented 5 years ago

Yep, looking good from here with both Edge and Chrome :)

image

I guess just make sure you're looking at a request for a content type that's configured for compression and that you've requested static files enough times within the configured threshold period for the static compression module to kick in.

AcidRaZor commented 5 years ago

Thanks man, will do!