<html>
<head>
<meta content="text/html; charset=ISO-8859-7"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">Hi, I used this as suggested by you ,
it's still not caching these images<br>
<br>
Varnish logs<br>
<blockquote type="cite"> 11 TxHeader c Content-Type:
image/jpeg;charset=UTF-8<br>
11 TxHeader c X-Cache: MISS<br>
13 TxURL b
/web/demo/home?p_p_id=propertyslider_WAR_propertysliderportlet&p_p_lifecycle=2&p_p_state=normal&p_p_mode=view&p_p_cacheability=cacheLevelPage&p_p_col_id=column-1&p_p_col_count=1&_propertyslider_WAR_propertysliderportlet_img-name=168.jpg&_propert<br>
13 TxProtocol b HTTP/1.1<br>
11 RxURL c
/web/demo/home?p_p_id=propertyslider_WAR_propertysliderportlet&p_p_lifecycle=2&p_p_state=normal&p_p_mode=view&p_p_cacheability=cacheLevelPage&p_p_col_id=column-1&p_p_col_count=1&_propertyslider_WAR_propertysliderportlet_img-name=168.jpg&_propert<br>
11 ObjHeader c Content-Type: image/jpeg;charset=UTF-8<br>
11 TxHeader c X-Cache: MISS<br>
</blockquote>
<br>
Thanks<br>
Shantanu<br>
<br>
<br>
On 11/04/2013 05:53 PM, ÃéÜííçò Êáñáãéáííßäçò wrote:<br>
</div>
<blockquote
cite="mid:10971c70fc044a11b16e12989978eaf7@DB4PR02MB046.eurprd02.prod.outlook.com"
type="cite">
<pre wrap="">Hi,
You could always use
// remove cookie from these
if (req.http.Content-Type ~ "(image|audio|video|pdf|flash|text)") { remove req.http.Cookie; }
Regards
From: <a class="moz-txt-link-abbreviated" href="mailto:varnish-misc-bounces+gkaragiannidis=dolnet.gr@varnish-cache.org">varnish-misc-bounces+gkaragiannidis=dolnet.gr@varnish-cache.org</a> [<a class="moz-txt-link-freetext" href="mailto:varnish-misc-bounces+gkaragiannidis=dolnet.gr@varnish-cache.org">mailto:varnish-misc-bounces+gkaragiannidis=dolnet.gr@varnish-cache.org</a>] On Behalf Of Kumar Shantanu
Sent: Monday, November 04, 2013 12:19 PM
To: <a class="moz-txt-link-abbreviated" href="mailto:varnish-misc@varnish-cache.org">varnish-misc@varnish-cache.org</a>
Subject: Caching images only
Hello everybody,
I am trying to cache all images for my website and it's working fine with simple configuration as given below.
sub vcl_recv {
if (req.url ~ "\.(png|gif|jpg|jpeg|bmp)$"){
remove req.http.Cookie;
}
It's caching image url which is simply ending with filename.jpeg, but this can't cache if the url is bit complex like this
<a class="moz-txt-link-freetext" href="http://test.demo.co.uk/web/demo/home?p_p_id=propertyslider_WAR_propertysliderportlet&p_p_lifecycle=2&p_p_state=normal&p_p_mode=view&p_p_cacheability=cacheLevelPage&p_p_col_id=column-1&p_p_col_count=1&_propertyslider_WAR_propertysliderportlet_img-name=152.jpeg&_propertyslider_WAR_propertysliderportlet_img-height=400&_propertyslider_WAR_propertysliderportlet_img-width=960">http://test.demo.co.uk/web/demo/home?p_p_id=propertyslider_WAR_propertysliderportlet&p_p_lifecycle=2&p_p_state=normal&p_p_mode=view&p_p_cacheability=cacheLevelPage&p_p_col_id=column-1&p_p_col_count=1&_propertyslider_WAR_propertysliderportlet_img-name=152.jpeg&_propertyslider_WAR_propertysliderportlet_img-height=400&_propertyslider_WAR_propertysliderportlet_img-width=960</a>
Any idea on how to achieve this. I tried using reqex to match url but failed :(
Thanks
Shantanu
</pre>
</blockquote>
<br>
<br>
<div class="moz-signature">-- <br>
<p>KUMAR SHANTANU<br>
</p>
<p>
<img moz-do-not-send="false"
src="cid:part1.01020201.03050901@techblue.co.uk"
alt="Signature"> </p>
<p>TEAM LEAD - IT<br>
<br>
FOR AND ON BEHALF OF: <br>
<br>
Technology Blueprint Ltd<br>
23 Clemens Street<br>
Royal Leamington Spa<br>
Warwickshire CV31 2DW <br>
<br>
T: 0845 004 7142 (Ext. 5001) <br>
E: <a class="moz-txt-link-abbreviated" href="mailto:shantanu@techblue.co.uk">shantanu@techblue.co.uk</a><br>
W: <a class="moz-txt-link-abbreviated" href="http://www.technologyblueprint.co.uk">www.technologyblueprint.co.uk</a> <a class="moz-txt-link-abbreviated" href="http://www.propco.co.uk">www.propco.co.uk</a><br>
<br>
The contents of this email are confidential and may be
privileged, and are intended only for the use of the person or
company named herein. Any views or opinions presented are solely
those of the author and do not necessarily represent those of
Technology Blueprint Limited. <br>
If you are not the intended recipient of this email or a person
responsible for delivering it to the intended recipient, you are
hereby notified that any distribution, copying or dissemination
of the information herein is strictly prohibited
</p>
</div>
</body>
</html>