<html><body><div style="color:#000; background-color:#fff; font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:12pt"><div><span>I see that my subject is incorrect for this emailed request. It should read "WMS layer doesn't honor cache control header" or something like that. Any help will be greatly appreciated.</span></div> <div class="qtdSeparateBR"><br><br></div><div class="yahoo_quoted" style="display: block;"> <div style="font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12pt;"> <div style="font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12pt;"> <div dir="ltr"> <font size="2" face="Arial"> On Saturday, June 7, 2014 11:02 AM, brad yoo <mildimp@yahoo.com> wrote:<br> </font> </div>  <br><br> <div class="y_msg_container"><div id="yiv9921653121"><div><div style="color: rgb(0, 0, 0);
 background-color: rgb(255, 255, 255); font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12pt;"><div>I have a web application that uses OpenLayers to display a base map and also allows users apply or remove specific WMS layers as desired. Everything is working as expected with the exception of layer caching. My geospatial server responds with a Last-Modified header, but OpenLayers doesn't send any requests to the server after the cached tile expires unless I refresh my page first.  For instance, when I first browse to the page using OpenLayers and select a layer to apply I see the appropriate requests being made and the tiles are returned. If I wait until they should expire and then toggle the visibility of the layer off and on again, no requests are made to the server at all until I refresh the page and reapply the layer. The cache control header Last-Modified seems to be honored as
 long as I refresh the page. If I refresh the page and reapply the WMS layer before the cached tile should expire, I see the request being made to the server and the expected 304 response. </div><div><br></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: transparent; font-style: normal;">Ive tried setting the layer function redraw to true, but then every time I make the layer visible a request is made with the _OLSALT parameter and the new request is made to the server. Obviously, this is not the behavior I want. When I toggle visibility on, I always want OpenLayers to make a request to the server with the If-Modified-Since header. Is there a way to achieve this expected behavior? What am I missing?</div></div></div></div><br><br></div>  </div> </div>  </div> </div></body></html>