1

In my Symfony2 web app, I need to set up Vary HTTP header for User-Agent, like in this link,

https://developers.google.com/webmasters/smartphone-sites/details?hl=en

Does any know how to do this ?

jef
  • 55
  • 9

1 Answers1

1

You can use the @Cache annotation, or you can set headers directly on a Response object.

http://symfony.com/doc/current/bundles/SensioFrameworkExtraBundle/annotations/cache.html

lxg
  • 12,375
  • 12
  • 51
  • 73
  • thanks a lot. i solved it like you suggested. Used @Cache(vary="User-Agent") before each class – jef Sep 18 '14 at 16:15