I have found that the most reliable way to avoid browser caching when I want to force a redraw of a WMS layer is to do something like this:<div><br></div><div><span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: 13px; border-collapse: collapse; ">wms_layer</span>.mergeNewParams({&#39;timestamp&#39;:datetime});</div>
<div><br></div><div>If you append the current timestamp to the layer each time you want to do a redraw it will have a unique address and thus bypass browser caching. If you do this you will not need to utilize the OpenLayers redraw function.<br clear="all">
--<br>Nathan Gerber<br>
<br><br><div class="gmail_quote">On Wed, May 12, 2010 at 4:07 PM, Eric Lemoine <span dir="ltr">&lt;<a href="mailto:eric.lemoine@camptocamp.com">eric.lemoine@camptocamp.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">On Wed, May 12, 2010 at 1:35 PM, Walter Lorenzetti &lt;<a href="mailto:lorenzetti@gis3w.it">lorenzetti@gis3w.it</a>&gt; wrote:<br>
&gt; Hi all,<br>
&gt;<br>
&gt; I build a webgis editing  application with OL 2.8, all work fine, but<br>
&gt; I&#39;ve a problem with redraw wms layer background:<br>
&gt;<br>
&gt; In my application I edit several layers during the editing mode... but<br>
&gt; on simple watching mode I show that layers like wms layer (by<br>
&gt; mapserver...)... after a layer editing action I invoke a<br>
&gt; wms_layer.redraw(true) method... but  I think for browser cache, the<br>
&gt; layer is redraw... but single tile doesn&#39;t change ad so for to see the<br>
&gt; changes I&#39;ve to pan the map until the layers wms are redraw....<br>
&gt;<br>
&gt; I hope you could understand my problem...<br>
<br>
<br>
</div>Hi. redraw(true) is supposed to do the job. Could you please post a<br>
simple example demonstrating the problem?<br>
<div class="im"><br>
<br>
<br>
--<br>
Eric Lemoine<br>
<br>
Camptocamp France SAS<br>
Savoie Technolac, BP 352<br>
73377 Le Bourget du Lac, Cedex<br>
<br>
Tel : 00 33 4 79 44 44 96<br>
Mail : <a href="mailto:eric.lemoine@camptocamp.com">eric.lemoine@camptocamp.com</a><br>
<a href="http://www.camptocamp.com" target="_blank">http://www.camptocamp.com</a><br>
_______________________________________________<br>
</div><div><div></div><div class="h5">Users mailing list<br>
<a href="mailto:Users@openlayers.org">Users@openlayers.org</a><br>
<a href="http://openlayers.org/mailman/listinfo/users" target="_blank">http://openlayers.org/mailman/listinfo/users</a><br>
</div></div></blockquote></div><br></div>