Closed pYr0x closed 6 years ago
Either it's a bug with whatever Chrome Lighthouse is, or it's a bug in this module. If it's a bug in this module would welcome any fix you can provide!
i have made a demo https://github.com/pYr0x/express-gzip even on that simple example, chrome and other browers dont show the Content-Encoding.
if i visit other global website e.g. https://www.nytimes.com/ i see a content-encoding: gzip
so a bug in chrome can be excluded.
the only difference on the respone headers i found is that:
can Transfer-Encoding: chunked
be the reason why the Content-Encoding is not shown or ignored by chrome?
@dougwilson is the demo shown you the Content-Encoding? i am on windows 10 with chrome 67.0.3396.79
Thanks for providing a repo! I an getting Content-Encoding: gzip
in the Chrome Console just as I would expect from your project:
you are on windows right? what node and npm version do you have installed?
Yes, I am on Windows 10. I used Node.js 8.11.2 (installed fresh just for this) so we would be using the exact same Node.js to try and keep every as similar as possible from what you said so far.
So I have no glue what’s going on... :(
Same. Variations of this issue have been report many times but either it suddenly started working and the reported doesn't know why or I had to close due to no further progress. If I could reproduce it I could try to track it down, otherwise since you can reproduce it we're all awaiting to hear what the issue is that you're having and where the bug is located.
ok one last try:
Hi @pYr0x sorry I didn't get back to you earlier. I just tried out your additional suggestions and everything is still working fine for me.
I did the following:
This means that nothing I had on my machine before was preset. There were no extensions in Chrome now, as it's a fresh install on a fresh Windows 10 install.
The file size that Chrome is showing with gzip is 87.9 kb.
Closing stale issue.
i have searched the closed issues and found some others that have the same problem. but no solution i enabled compression with
app.use(compression({ threshold: 0 }));
chrome networktab says: no compression, no content-encoding.
chrome lighthouse extension says: Enable Text Compression!
firefox networktab: no content-encoding on the response
i turned debugging on
set DEBUG=compression
i see on every request:if i used
curl -i --compressed http://localhost:3000/dist/bundles/medicalpad/index.css
i seeso i dont know whats going on there.
i am using: