Accept Header / cache versioning issue

biazus nginx-forum at
Wed Aug 19 16:00:21 UTC 2015

Hi Guys,

I noticed that Nginx 1.8.X is taking into account the Client Header "Accept"
for versioning the cache objects, for instance:

This request, generates one object in cache: 

curl -sv -o /dev/null ' -H  'Accept: */*'

And this, generates another one:

curl -sv -o /dev/null ' -H  'Accept: text/html,
image/gif, image/jpeg, *; q=.2, */*; q=.2'

This one, another one, and so on:

curl -sv -o /dev/null ' -H  'Accept:

Considering this behaviour:

it will generate many versions of the same object in cache, using much more
disc resources, space, IO.

It will reduce the cache hit ratio, as a consequence, will reduce the

Then, I have a question:

Is there any way to normalize the Accept header, or even ignore it ?

Thanks in advance,


Posted at Nginx Forum:,261128,261128#msg-261128

More information about the nginx mailing list