Deny caching on mime-type
Andreas Plesner Jacobsen
apj at mutt.dk
Fri Mar 23 14:20:05 CET 2012
On Fri, Mar 23, 2012 at 12:43:20PM +0100, Hauke Lampe wrote:
>
> > I have a IIS back-end server which serves a aspx file Content-Type as
> > text/html or text/vnd.wap.wml depending on the browser request, i.e it
> > serves Content-Type text/vnd.wap.wml to a wap-browser, but serves
> > Content-Type text/html to chrome/firefox/ie.
> >
> > How do I ask varnish not to cache based on mime-tyme text/vnd.wap.wml ?
>
> You shouldn't. Have IIS add a "Vary: User-Agent" header, so that varnish
> caches the different versions.
>
> You might want to normalize the User-Agent header in vcl_recv() to
> reduce the number of variants and improve cache efficiency, but that's
> not strictly necessary.
Not just "might". You need to. There's way too much variance in User-Agent.
--
Andreas
More information about the varnish-misc
mailing list