<div dir="ltr">Hi there, <div><br></div><div>In order to save some time to people who might find this thread, here is how to force mod_pagespeed to send a fully optimized version to varnish:</div><div><br></div><div>In your .vcl file:</div>
<div><br></div><div>sub vcl_recv() {</div><div> set req.http.X-PSA-Blocking-Rewrite = "whatever-you-want";<br></div><div>}</div><div><br></div><div>In your pagespeed configuration:</div><div><br></div><div>
<div>ModPagespeedBlockingRewriteKey <span class="" style="white-space:pre"> </span>"whatever-you-want"</div><div><br></div><div>It is worth noting that a feature meant to make reverse proxies like varnish happy with mod_pagespeed is currently in beta, here is the relevant link: <a href="https://developers.google.com/speed/pagespeed/module/downstream-caching">https://developers.google.com/speed/pagespeed/module/downstream-caching</a></div>
<div><br></div><div>-Hugues</div><div>Betabrand.com</div><div><br></div><div><br></div></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Jun 20, 2013 at 1:07 AM, Łukasz Rysiak <span dir="ltr"><<a href="mailto:lury@critical.pl" target="_blank">lury@critical.pl</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">David, please read this thread on google mps forum, where i described the same problem and got the solution from mps developers.<div>
<a href="https://groups.google.com/forum/#!topic/mod-pagespeed-discuss/j7X4uSckXlg" target="_blank">https://groups.google.com/forum/#!topic/mod-pagespeed-discuss/j7X4uSckXlg</a><br>
</div><div><br></div><div>You can add header which will force mps to do full optimisation before sending a response to varnish.</div><div><br></div><div><br></div><div class="gmail_extra"><br clear="all"><div><div dir="ltr">
<div><br></div><div>Regards,</div><div><br></div><div>Łukasz Rysiak </div><div>Critical - Conversion Experts</div><div>tel. 792 448 678</div><div><a href="http://critical.pl" target="_blank">http://critical.pl</a></div><div>
<br></div></div></div>
<br><br><div class="gmail_quote">2013/6/20 <span dir="ltr"><<a href="mailto:me@ibotty.net" target="_blank">me@ibotty.net</a>></span><div><div class="h5"><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
hi,<br>
<div><br>
> The problem is that varnish caches the first request - an unoptimized<br>
> page. I wonder whether somebody has found a way to tell varnish to<br>
> ignore the first request after the ttl is over and cache the second<br>
> one?<br>
<br>
</div>maybe you can configure mod_pagespeed to set a header when it is only<br>
passing through the page.<br>
<br>
and i thought the recommended setup is to have mod_pagespeed before<br>
varnish, but i've never set it up.<br>
<br>
good luck,<br>
tobias florek<br>
<div><div><br>
<br>
_______________________________________________<br>
varnish-misc mailing list<br>
<a href="mailto:varnish-misc@varnish-cache.org" target="_blank">varnish-misc@varnish-cache.org</a><br>
<a href="https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc" target="_blank">https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc</a><br>
</div></div></blockquote></div></div></div><br></div></div>
<br>_______________________________________________<br>
varnish-misc mailing list<br>
<a href="mailto:varnish-misc@varnish-cache.org">varnish-misc@varnish-cache.org</a><br>
<a href="https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc" target="_blank">https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc</a><br></blockquote></div><br></div>