0

I've read this post.

It says that a file is compressed (on default) only if it was requested 2 times in a 10 seconds period.

How should I configure frequentHitThreshold and frequentHitTimePeriod for making the server compress and cache a static file before the first request? so when the first request comes, the user will be served with compressed file?

At the very least, I need the first request to be served compressed.

How can I do that?

Thanks

johni
  • 109
  • 1
  • I have the same issue. I have a big main.js file (4mb) and compressed is around 900kb. However, the website does not have so many users, but when a person tries to access the website from a 3G have to wait around 30 seconds. From my tests, if are more users at the same time, the file is Gzipped and on the same connection, from 30 seconds drops to 12 seconds, which is huge :O So I am interested to know how I can always have a gzip version of my main.js – Alin C Feb 28 '19 at 09:07

1 Answers1

0

You can try setting the threshold to 1. I'm guessing it will think all request are frequently hit and do compression. Much to your CPU's delight.

milope
  • 441
  • 2
  • 5