Re: HTTP Header Vary: User-Agent

Olaf Schreck <[email protected]> Thu, 2 Apr 2026 19:37:02 +0200
Newsgroups gmane.text.xml.exist
Message-ID <[email protected]>
Matthias,

> since i recently worked towards a cache in front of existdb, i wonder why
> there is the value "User-Agent" added to a Vary header i cannot control from
> Xquery.

Been there, seen that.  We saw the same issue with a caching proxy in front
of eXist-db, resulting in multiple cached copies of the same resource because
of Vary: user-agent.

I think this was solved by editing $EXIST_HOME/etc/jetty/jetty-gzip.xml and
removing or commenting out the section "<Set name=excludedAgentPatterns>..."

The only reason for having this in the Jetty config is to support MSIE 6,
which could not handle gzip compression.  Given that MSIE 6 is >20 years old,
I don't see a real need to support it.

And the benefit is: "Vary: user-agent" gone.

Disclaimer: If memory serves correctly.

Olaf