<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=Content-Type content="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 11 (filtered medium)">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]-->
<style>
<!--
/* Font Definitions */
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman";}
a:link, span.MsoHyperlink
{color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{color:blue;
text-decoration:underline;}
code
{font-family:"Courier New";}
span.EmailStyle20
{mso-style-type:personal-reply;
font-family:Arial;
color:navy;}
@page Section1
{size:8.5in 11.0in;
margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
{page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang=EN-US link=blue vlink=blue style='word-wrap: break-word;-webkit-nbsp-mode: space;
-webkit-line-break: after-white-space'>
<div class=Section1>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>></span></font> Am I still gaining the
benefits of Varnish if the Request Headers cookies exist?<o:p></o:p></p>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>Varnish by default will not cache anything
with a cookie.<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>You could verify if the unset is actually
reached by placing a log statement in your if clausule.<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>Hope that helps ( a little )<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>
<div>
<div class=MsoNormal align=center style='text-align:center'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'>
<hr size=2 width="100%" align=center tabindex=-1>
</span></font></div>
<p class=MsoNormal><b><font size=2 face=Tahoma><span style='font-size:10.0pt;
font-family:Tahoma;font-weight:bold'>From:</span></font></b><font size=2
face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma'>
varnish-misc-bounces@varnish-cache.org
[mailto:varnish-misc-bounces@varnish-cache.org] <b><span style='font-weight:
bold'>On Behalf Of </span></b>Chris Altman<br>
<b><span style='font-weight:bold'>Sent:</span></b> Wednesday, September 29,
2010 6:06 PM<br>
<b><span style='font-weight:bold'>To:</span></b> varnish-misc@varnish-cache.org<br>
<b><span style='font-weight:bold'>Subject:</span></b> How do you confirm
cookies are removed from static files?</span></font><o:p></o:p></p>
</div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p> </o:p></span></font></p>
<div>
<div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>I am new to Varnish and have read the documentation. My goal is to
remove all cookies from static files. I am using Varnish 2.1.3<o:p></o:p></span></font></p>
</div>
<div style='word-wrap: break-word;-webkit-nbsp-mode: space;-webkit-line-break: after-white-space'>
<div>
<div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p> </o:p></span></font></p>
</div>
<div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>My VCL is:<o:p></o:p></span></font></p>
</div>
<div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p> </o:p></span></font></p>
</div>
<div>
<div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>sub vcl_recv {<o:p></o:p></span></font></p>
</div>
<div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'> if (req.url ~ "\.(png|gif|jpg|swf|css|js)$") {<o:p></o:p></span></font></p>
</div>
<div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'> unset req.http.cookie;<o:p></o:p></span></font></p>
</div>
<div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'> }<o:p></o:p></span></font></p>
</div>
<div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>}<o:p></o:p></span></font></p>
</div>
</div>
<div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p> </o:p></span></font></p>
</div>
<div>
<div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>sub vcl_fetch {<o:p></o:p></span></font></p>
</div>
<div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'> if (req.url ~ "\.(png|gif|jpg|swf|css|js)$") {<o:p></o:p></span></font></p>
</div>
<div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'> unset beresp.http.set-cookie;<o:p></o:p></span></font></p>
</div>
<div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'> }<o:p></o:p></span></font></p>
</div>
<div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>}<o:p></o:p></span></font></p>
</div>
</div>
<div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p> </o:p></span></font></p>
</div>
<div>
<p class=MsoNormal><b><font size=3 face="Times New Roman"><span
style='font-size:12.0pt;font-weight:bold'>Question:</span></font></b><o:p></o:p></p>
</div>
<div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>I am confused because it appears the static files are served from
Varnish but still have a cookie in their Request Headers. How do I remove the
Request Headers cookie? Am I still gaining the benefits of Varnish if the
Request Headers cookies exist?<o:p></o:p></span></font></p>
</div>
<div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p> </o:p></span></font></p>
</div>
<div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>Thank you,<o:p></o:p></span></font></p>
</div>
<div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>Chris Altman<o:p></o:p></span></font></p>
</div>
<div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><a href="http://my.perqworks.com/">http://my.perqworks.com</a><o:p></o:p></span></font></p>
</div>
<div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><a href="http://prtclr.com/">http://prtclr.com</a><o:p></o:p></span></font></p>
</div>
<div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p> </o:p></span></font></p>
</div>
<div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p> </o:p></span></font></p>
</div>
<div>
<p class=MsoNormal><b><font size=3 face="Times New Roman"><span
style='font-size:12.0pt;font-weight:bold'>Response Headers<span
class=netheadersviewsourceresponse>view source</span></span></font></b><o:p></o:p></p>
</div>
<table class=MsoNormalTable border=0 cellspacing=0 cellpadding=0
style='z-index:auto'>
<tr role=listitem>
<td style='padding:0in 0in 0in 0in' role=presentation>
<p class=MsoNormal><font size=3 face="Times New Roman"><span
style='font-size:12.0pt'>Server<o:p></o:p></span></font></p>
</td>
<td style='padding:0in 0in 0in 0in' role=list aria-label=Server>
<p class=MsoNormal><code role=listitem><font size=2 face="Courier New"><span
style='font-size:10.0pt'>Apache/2.2.14 (Ubuntu)</span></font></code><o:p></o:p></p>
</td>
</tr>
<tr role=listitem>
<td style='padding:0in 0in 0in 0in' role=presentation>
<p class=MsoNormal><font size=3 face="Times New Roman"><span
style='font-size:12.0pt'>X-Powered-By<o:p></o:p></span></font></p>
</td>
<td style='padding:0in 0in 0in 0in' role=list aria-label=X-Powered-By>
<p class=MsoNormal><code role=listitem><font size=2 face="Courier New"><span
style='font-size:10.0pt'>PHP/5.3.2-1ubuntu4.5</span></font></code><o:p></o:p></p>
</td>
</tr>
<tr role=listitem>
<td style='padding:0in 0in 0in 0in' role=presentation>
<p class=MsoNormal><font size=3 face="Times New Roman"><span
style='font-size:12.0pt'>Expires<o:p></o:p></span></font></p>
</td>
<td style='padding:0in 0in 0in 0in' role=list aria-label=Expires>
<p class=MsoNormal><code role=listitem><font size=2 face="Courier New"><span
style='font-size:10.0pt'>Thu, 29 Sep 2011 15:56:42 GMT</span></font></code><o:p></o:p></p>
</td>
</tr>
<tr role=listitem>
<td style='padding:0in 0in 0in 0in' role=presentation>
<p class=MsoNormal><font size=3 face="Times New Roman"><span
style='font-size:12.0pt'>Vary<o:p></o:p></span></font></p>
</td>
<td style='padding:0in 0in 0in 0in' role=list aria-label=Vary>
<p class=MsoNormal><code role=listitem><font size=2 face="Courier New"><span
style='font-size:10.0pt'>Accept-Encoding</span></font></code><o:p></o:p></p>
</td>
</tr>
<tr role=listitem>
<td style='padding:0in 0in 0in 0in' role=presentation>
<p class=MsoNormal><font size=3 face="Times New Roman"><span
style='font-size:12.0pt'>Last-Modified<o:p></o:p></span></font></p>
</td>
<td style='padding:0in 0in 0in 0in' role=list aria-label=Last-Modified>
<p class=MsoNormal><code role=listitem><font size=2 face="Courier New"><span
style='font-size:10.0pt'>Thu, 24 Jun 2010 21:16:50 GMT</span></font></code><o:p></o:p></p>
</td>
</tr>
<tr role=listitem>
<td style='padding:0in 0in 0in 0in' role=presentation>
<p class=MsoNormal><font size=3 face="Times New Roman"><span
style='font-size:12.0pt'>Cache-Control<o:p></o:p></span></font></p>
</td>
<td style='padding:0in 0in 0in 0in' role=list aria-label=Cache-Control>
<p class=MsoNormal><code role=listitem><font size=2 face="Courier New"><span
style='font-size:10.0pt'>max-age=31536000, public</span></font></code><o:p></o:p></p>
</td>
</tr>
<tr role=listitem>
<td style='padding:0in 0in 0in 0in' role=presentation>
<p class=MsoNormal><font size=3 face="Times New Roman"><span
style='font-size:12.0pt'>Content-Encoding<o:p></o:p></span></font></p>
</td>
<td style='padding:0in 0in 0in 0in' role=list aria-label=Content-Encoding>
<p class=MsoNormal><code role=listitem><font size=2 face="Courier New"><span
style='font-size:10.0pt'>gzip</span></font></code><o:p></o:p></p>
</td>
</tr>
<tr role=listitem>
<td style='padding:0in 0in 0in 0in' role=presentation>
<p class=MsoNormal><font size=3 face="Times New Roman"><span
style='font-size:12.0pt'>Content-Type<o:p></o:p></span></font></p>
</td>
<td style='padding:0in 0in 0in 0in' role=list aria-label=Content-Type>
<p class=MsoNormal><code role=listitem><font size=2 face="Courier New"><span
style='font-size:10.0pt'>text/css; charset=utf-8</span></font></code><o:p></o:p></p>
</td>
</tr>
<tr role=listitem>
<td style='padding:0in 0in 0in 0in' role=presentation>
<p class=MsoNormal><font size=3 face="Times New Roman"><span
style='font-size:12.0pt'>Content-Length<o:p></o:p></span></font></p>
</td>
<td style='padding:0in 0in 0in 0in' role=list aria-label=Content-Length>
<p class=MsoNormal><code role=listitem><font size=2 face="Courier New"><span
style='font-size:10.0pt'>3339</span></font></code><o:p></o:p></p>
</td>
</tr>
<tr role=listitem>
<td style='padding:0in 0in 0in 0in' role=presentation>
<p class=MsoNormal><font size=3 face="Times New Roman"><span
style='font-size:12.0pt'>Date<o:p></o:p></span></font></p>
</td>
<td style='padding:0in 0in 0in 0in' role=list aria-label=Date>
<p class=MsoNormal><code role=listitem><font size=2 face="Courier New"><span
style='font-size:10.0pt'>Wed, 29 Sep 2010 15:56:42 GMT</span></font></code><o:p></o:p></p>
</td>
</tr>
<tr role=listitem>
<td style='padding:0in 0in 0in 0in' role=presentation>
<p class=MsoNormal><font size=3 face="Times New Roman"><span
style='font-size:12.0pt'>X-Varnish<o:p></o:p></span></font></p>
</td>
<td style='padding:0in 0in 0in 0in' role=list aria-label=X-Varnish>
<p class=MsoNormal><code role=listitem><font size=2 face="Courier New"><span
style='font-size:10.0pt'>2062520895</span></font></code><o:p></o:p></p>
</td>
</tr>
<tr role=listitem>
<td style='padding:0in 0in 0in 0in' role=presentation>
<p class=MsoNormal><font size=3 face="Times New Roman"><span
style='font-size:12.0pt'>Age<o:p></o:p></span></font></p>
</td>
<td style='padding:0in 0in 0in 0in' role=list aria-label=Age>
<p class=MsoNormal><code role=listitem><font size=2 face="Courier New"><span
style='font-size:10.0pt'>0</span></font></code><o:p></o:p></p>
</td>
</tr>
<tr role=listitem>
<td style='padding:0in 0in 0in 0in' role=presentation>
<p class=MsoNormal><font size=3 face="Times New Roman"><span
style='font-size:12.0pt'>Via<o:p></o:p></span></font></p>
</td>
<td style='padding:0in 0in 0in 0in' role=list aria-label=Via>
<p class=MsoNormal><code role=listitem><font size=2 face="Courier New"><span
style='font-size:10.0pt'>1.1 varnish</span></font></code><o:p></o:p></p>
</td>
</tr>
<tr role=listitem>
<td style='padding:0in 0in 0in 0in' role=presentation>
<p class=MsoNormal><font size=3 face="Times New Roman"><span
style='font-size:12.0pt'>Connection<o:p></o:p></span></font></p>
</td>
<td style='padding:0in 0in 0in 0in' role=list aria-label=Connection>
<p class=MsoNormal><code role=listitem><font size=2 face="Courier New"><span
style='font-size:10.0pt'>keep-alive</span></font></code><o:p></o:p></p>
</td>
</tr>
</table>
<div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p> </o:p></span></font></p>
</div>
<div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p> </o:p></span></font></p>
</div>
<div>
<p class=MsoNormal><b><font size=3 face="Times New Roman"><span
style='font-size:12.0pt;font-weight:bold'>Request Headers<span
class=netheadersviewsourcerequest>view source</span></span></font></b><o:p></o:p></p>
</div>
<table class=MsoNormalTable border=0 cellspacing=0 cellpadding=0
style='z-index:auto'>
<tr role=listitem>
<td style='padding:0in 0in 0in 0in' role=presentation>
<p class=MsoNormal><font size=3 face="Times New Roman"><span
style='font-size:12.0pt'>Host<o:p></o:p></span></font></p>
</td>
<td style='padding:0in 0in 0in 0in' role=list aria-label=Host>
<p class=MsoNormal><code role=listitem><font size=2 face="Courier New"><span
style='font-size:10.0pt'><a href="http://my.perqapp.com/">my.perqapp.com</a></span></font></code><o:p></o:p></p>
</td>
</tr>
<tr role=listitem>
<td style='padding:0in 0in 0in 0in' role=presentation>
<p class=MsoNormal><font size=3 face="Times New Roman"><span
style='font-size:12.0pt'>User-Agent<o:p></o:p></span></font></p>
</td>
<td style='padding:0in 0in 0in 0in' role=list aria-label=User-Agent>
<p class=MsoNormal><code role=listitem><font size=2 face="Courier New"><span
style='font-size:10.0pt'>Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6;
en-US; rv:1.9.2.10) Gecko/20100914 Firefox/3.6.10</span></font></code><o:p></o:p></p>
</td>
</tr>
<tr role=listitem>
<td style='padding:0in 0in 0in 0in' role=presentation>
<p class=MsoNormal><font size=3 face="Times New Roman"><span
style='font-size:12.0pt'>Accept<o:p></o:p></span></font></p>
</td>
<td style='padding:0in 0in 0in 0in' role=list aria-label=Accept>
<p class=MsoNormal><code role=listitem><font size=2 face="Courier New"><span
style='font-size:10.0pt'>text/css,*/*;q=0.1</span></font></code><o:p></o:p></p>
</td>
</tr>
<tr role=listitem>
<td style='padding:0in 0in 0in 0in' role=presentation>
<p class=MsoNormal><font size=3 face="Times New Roman"><span
style='font-size:12.0pt'>Accept-Language<o:p></o:p></span></font></p>
</td>
<td style='padding:0in 0in 0in 0in' role=list aria-label=Accept-Language>
<p class=MsoNormal><code role=listitem><font size=2 face="Courier New"><span
style='font-size:10.0pt'>en-us,en;q=0.5</span></font></code><o:p></o:p></p>
</td>
</tr>
<tr role=listitem>
<td style='padding:0in 0in 0in 0in' role=presentation>
<p class=MsoNormal><font size=3 face="Times New Roman"><span
style='font-size:12.0pt'>Accept-Encoding<o:p></o:p></span></font></p>
</td>
<td style='padding:0in 0in 0in 0in' role=list aria-label=Accept-Encoding>
<p class=MsoNormal><code role=listitem><font size=2 face="Courier New"><span
style='font-size:10.0pt'>gzip,deflate</span></font></code><o:p></o:p></p>
</td>
</tr>
<tr role=listitem>
<td style='padding:0in 0in 0in 0in' role=presentation>
<p class=MsoNormal><font size=3 face="Times New Roman"><span
style='font-size:12.0pt'>Accept-Charset<o:p></o:p></span></font></p>
</td>
<td style='padding:0in 0in 0in 0in' role=list aria-label=Accept-Charset>
<p class=MsoNormal><code role=listitem><font size=2 face="Courier New"><span
style='font-size:10.0pt'>ISO-8859-1,utf-8;q=0.7,*;q=0.7</span></font></code><o:p></o:p></p>
</td>
</tr>
<tr role=listitem>
<td style='padding:0in 0in 0in 0in' role=presentation>
<p class=MsoNormal><font size=3 face="Times New Roman"><span
style='font-size:12.0pt'>Keep-Alive<o:p></o:p></span></font></p>
</td>
<td style='padding:0in 0in 0in 0in' role=list aria-label=Keep-Alive>
<p class=MsoNormal><code role=listitem><font size=2 face="Courier New"><span
style='font-size:10.0pt'>115</span></font></code><o:p></o:p></p>
</td>
</tr>
<tr role=listitem>
<td style='padding:0in 0in 0in 0in' role=presentation>
<p class=MsoNormal><font size=3 face="Times New Roman"><span
style='font-size:12.0pt'>Connection<o:p></o:p></span></font></p>
</td>
<td style='padding:0in 0in 0in 0in' role=list aria-label=Connection>
<p class=MsoNormal><code role=listitem><font size=2 face="Courier New"><span
style='font-size:10.0pt'>keep-alive</span></font></code><o:p></o:p></p>
</td>
</tr>
<tr role=listitem>
<td style='padding:0in 0in 0in 0in' role=presentation>
<p class=MsoNormal><font size=3 face="Times New Roman"><span
style='font-size:12.0pt'>Referer<o:p></o:p></span></font></p>
</td>
<td style='padding:0in 0in 0in 0in' role=list aria-label=Referer>
<p class=MsoNormal><code role=listitem><font size=2 face="Courier New"><span
style='font-size:10.0pt'><a href="http://my.perqapp.com/login">http://my.perqapp.com/login</a></span></font></code><o:p></o:p></p>
</td>
</tr>
<tr role=listitem>
<td style='padding:0in 0in 0in 0in' role=presentation>
<p class=MsoNormal><font size=3 face="Times New Roman"><span
style='font-size:12.0pt'>Cookie<o:p></o:p></span></font></p>
</td>
<td style='padding:0in 0in 0in 0in' role=list aria-label=Cookie>
<p class=MsoNormal><code role=listitem><font size=2 face="Courier New"><span
style='font-size:10.0pt'>perq=20;
__utma=90567579.1481902958.1285699566.1285768162.1285775102.4;
__utmz=90567579.1285699566.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none);
perqworks=c7jcfkdueap5ggtbds500al703; __utmb=90567579.4.10.1285775102;
__utmc=90567579</span></font></code><o:p></o:p></p>
</td>
</tr>
</table>
<div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p> </o:p></span></font></p>
</div>
</div>
</div>
</div>
</div>
</body>
</html>