title: Varnish custom html based on User Agent
body: <p>I want to display different html styles to users based on <code>$_SERVER['HTTP_USER_AGENT']</code>. How can I achieve this with varnish settings, to make it have a specific cache for a specific user agent.</p>
  
  <p>I know I can achieve something similar with JS, but that's not reliable for me I want to do it server side.</p>
  
  <p>The php I will use in my html to detect user agents will look like this;</p>
  
  <pre><code>&lt;?php if($_SERVER['HTTP_USER_AGENT'] == $target):?&gt;
      &lt;style&gt;
        //CSS
      &lt;/style&gt;    
      &lt;?php endif;?&gt;
  </code></pre>
  
  <p>How can I setup <strong>Varnish</strong> so it work neatly with this?</p>