<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: WMS Layers Not Refreshing with Caching Disabled in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/wms-layers-not-refreshing-with-caching-disabled/m-p/677669#M63196</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Assuming you are using the &lt;A href="https://developers.arcgis.com/javascript/jsapi/wmslayer-amd.html"&gt;WMSLayer&lt;/A&gt; class, you are likely running into a caching issue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Essentially, your browser doesn't know the underlying image has changed, as the URL remains the same.&amp;nbsp; This is why panning or zooming gives you the latest image; by changing the extent of your WMS GetMap request, the URL changes, and since it does not exist in your browser cache yet, a new image is downloaded from the service.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;According to the WMSLayer documentation, the &lt;A href="https://developers.arcgis.com/javascript/jsapi/wmslayer-amd.html#refresh"&gt;refresh()&lt;/A&gt; function only works if the disableClientCaching property of the service is set to true.&amp;nbsp; Unfortunately the disableClientCaching property is not listed as a valid property of WMSLayer (it is listed under &lt;A href="https://developers.arcgis.com/javascript/jsapi/arcgisdynamicmapservicelayer-amd.html#disableclientcaching"&gt;ArcGISDynamicMapServiceLayer&lt;/A&gt;, however), but I suspect it may still work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try the following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="javascript" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_14060552629995750 jive_text_macro" jivemacro_uid="_14060552629995750"&gt;
&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;wmsRadarLayer.disableClientCaching = true;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;wmsRadarLayer.refresh();&lt;/SPAN&gt;&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;If that doesn't work, try this:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="javascript" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_1406055272876700 jive_text_macro" jivemacro_uid="_1406055272876700"&gt;
&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;wmsRadarLayer.setDisableClientCaching(true);&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;wmsRadarLayer.refresh();&lt;/SPAN&gt;&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If neither of those work, this option may not be supported for the WMSLayer class, and your only option (other than submitting an enhancement request) would likely be to create your own WMSLayer class whose getImageURL() function includes a random number (or perhaps the present epoch time) as an extra query parameter, such as "&amp;amp;nocache=1406055134".&amp;nbsp; You can find an example of creating a custom WMS Layer here:&amp;nbsp; &lt;A href="https://developers.arcgis.com/javascript/jssamples/layers_custom_wms.html" title="https://developers.arcgis.com/javascript/jssamples/layers_custom_wms.html"&gt;Custom layer - WMS | ArcGIS API for JavaScript&lt;/A&gt;‌&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 22 Jul 2014 18:56:06 GMT</pubDate>
    <dc:creator>JasonGreenlaw</dc:creator>
    <dc:date>2014-07-22T18:56:06Z</dc:date>
    <item>
      <title>WMS Layers Not Refreshing with Caching Disabled</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/wms-layers-not-refreshing-with-caching-disabled/m-p/677663#M63190</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a series of WMS layers that I'm pulling in from NOAA's NowCoast.&amp;nbsp; All is well except when trying to refresh the layers.&amp;nbsp; I have the page setup to auto refresh, and also to refresh using an onClick button.&amp;nbsp; When I click the button (after waiting sufficient time for the image to be updated on the parent server), nothing happens.&amp;nbsp; However, as soon as I pan or zoom the map, it refreshes.&amp;nbsp; So did some searching and found an old thread that suggested including map.setExtent(map.extent) in the refresh function.&amp;nbsp; So I did this, which is what actually makes the map refresh on pan/zoom I believe, without that, it wouldn't even refresh on pan/zoom.&amp;nbsp; Thus, I am still not getting what I want.&amp;nbsp; Can anyone help me out?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="javascript" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_14048303785365531 jive_text_macro" jivemacro_uid="_14048303785365531"&gt;
&lt;P&gt;&lt;/P&gt;


&lt;/PRE&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;function RefreshWMSLayers(){&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;wmsRadarLayer.refresh();&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;wmsWarnLayer.refresh();&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;wmsGOESVISLayer.refresh();&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;wmsGOESIRLayer.refresh();&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;wmsOBSLayer.refresh();&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;wmsTempLayer.refresh();&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;wmsSSTLayer.refresh();&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;}&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;function AutoRefreshMap(){&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;dts = getDateTime();&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;console.log("Auto Refreshing at " + dts);&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;document.getElementById('DTS').textContent = dts;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;RefreshWMSLayers();&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;map.setExtent(map.extent);&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;}&amp;nbsp; &lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;function RefreshMap(){&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;dts = getDateTime();&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;console.log("On Demand Refreshing at " + dts);&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;document.getElementById('DTS').textContent = dts;&amp;nbsp; &lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;RefreshWMSLayers();&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;map.setExtent(map.extent);&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;}&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Jul 2014 14:40:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/wms-layers-not-refreshing-with-caching-disabled/m-p/677663#M63190</guid>
      <dc:creator>CharlesGant</dc:creator>
      <dc:date>2014-07-08T14:40:27Z</dc:date>
    </item>
    <item>
      <title>Re: WMS Layers Not Refreshing with Caching Disabled</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/wms-layers-not-refreshing-with-caching-disabled/m-p/677664#M63191</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;perhaps try setting the &lt;A href="https://developers.arcgis.com/javascript/jsapi/wmslayer-amd.html#refreshinterval"&gt;refreshInterval&lt;/A&gt; property which was added at &lt;A href="https://developers.arcgis.com/javascript/jshelp/new_v37.html"&gt;3.7&lt;/A&gt;?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Jul 2014 15:49:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/wms-layers-not-refreshing-with-caching-disabled/m-p/677664#M63191</guid>
      <dc:creator>JohnGravois</dc:creator>
      <dc:date>2014-07-08T15:49:15Z</dc:date>
    </item>
    <item>
      <title>Re: WMS Layers Not Refreshing with Caching Disabled</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/wms-layers-not-refreshing-with-caching-disabled/m-p/677665#M63192</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the help John.&amp;nbsp; However, the WMS Layer still only updates when I physically pan/zoom the map.&amp;nbsp; Here is the modification I made to the WMSLayer call.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&amp;nbsp;&amp;nbsp; &lt;/TD&gt;&lt;TD&gt; &lt;/TD&gt;&lt;TD&gt;var layers = new WMSLayerInfo({});&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&amp;nbsp;&amp;nbsp; &lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt; var resourceInfo = {extent: new Extent(-126.40869140625, 31.025390625, -109.66552734375, 41.5283203125, {wkid: 4326}),layerInfos: [layers]};&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&amp;nbsp;&amp;nbsp; &lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&amp;nbsp;&amp;nbsp; &lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;&lt;SPAN&gt; var wmsRadarLayer = new WMSLayer('&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://nowcoast.noaa.gov:80/wms/com.esri.wms.Esrimap/obs" rel="nofollow" target="_blank"&gt;http://nowcoast.noaa.gov:80/wms/com.esri.wms.Esrimap/obs&lt;/A&gt;&lt;SPAN&gt;?', {resourceInfo: resourceInfo,visibleLayers: ['RAS_RIDGE_NEXRAD'],"visible":false,"setDisableClientCaching":true,"refreshInterval":1.0,opacity:0.9});&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&amp;nbsp;&amp;nbsp; &lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt; wmsRadarLayer.version = "1.1.1";&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Jul 2014 16:58:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/wms-layers-not-refreshing-with-caching-disabled/m-p/677665#M63192</guid>
      <dc:creator>CharlesGant</dc:creator>
      <dc:date>2014-07-08T16:58:43Z</dc:date>
    </item>
    <item>
      <title>Re: WMS Layers Not Refreshing with Caching Disabled</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/wms-layers-not-refreshing-with-caching-disabled/m-p/677666#M63193</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;based on my reading of the doc, refreshInterval is property of the class that is not exposed as a &lt;A href="https://developers.arcgis.com/javascript/jsapi/wmslayer-amd.html#wmslayer1"&gt;constructor&lt;/A&gt; option.&amp;nbsp; &lt;/P&gt;&lt;P&gt;try setting it independently.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="keyword" style="font-size: 12px; font-family: Consolas, 'Courier New', Courier, mono, serif; color: #006699; background-color: #f8f8f8;"&gt;var&lt;/SPAN&gt;&lt;SPAN style="font-size: 12px; font-family: Consolas, 'Courier New', Courier, mono, serif; color: #000000; background-color: #f8f8f8;"&gt; wmsRadarLayer = &lt;/SPAN&gt;&lt;SPAN class="keyword" style="font-size: 12px; font-family: Consolas, 'Courier New', Courier, mono, serif; color: #006699; background-color: #f8f8f8;"&gt;new&lt;/SPAN&gt;&lt;SPAN style="font-size: 12px; font-family: Consolas, 'Courier New', Courier, mono, serif; color: #000000; background-color: #f8f8f8;"&gt; WMSLayer(&lt;/SPAN&gt;&lt;SPAN class="string" style="font-size: 12px; font-family: Consolas, 'Courier New', Courier, mono, serif; color: blue; background-color: #f8f8f8;"&gt;&lt;SPAN&gt;'&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://" rel="nofollow" target="_blank"&gt;http://&lt;/A&gt;&lt;SPAN&gt;...&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #50881a; font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; background-color: #f8f8f8;"&gt;//interval is defined in minutes (.05 = 3 seconds)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 12px; background-color: #f8f8f8; font-family: Consolas, 'Courier New', Courier, mono, serif;"&gt;wmsRadarLayer.refreshInterval = .05;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Jul 2014 17:14:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/wms-layers-not-refreshing-with-caching-disabled/m-p/677666#M63193</guid>
      <dc:creator>JohnGravois</dc:creator>
      <dc:date>2014-07-08T17:14:48Z</dc:date>
    </item>
    <item>
      <title>Re: WMS Layers Not Refreshing with Caching Disabled</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/wms-layers-not-refreshing-with-caching-disabled/m-p/677667#M63194</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well I tried that and it seems to still be only updating when I pan/zoom.&amp;nbsp; I copied in exactly what you have in the post above.&amp;nbsp; All I did was change the interval to 1 minute.&amp;nbsp; I sat and watched for ten minutes with no update.&amp;nbsp; As soon as I touched the map and panned just a bit, it updated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 12px; background-color: #f8f8f8; font-family: Consolas, 'Courier New', Courier, mono, serif;"&gt;wmsRadarLayer.refreshInterval = .05;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Jul 2014 17:59:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/wms-layers-not-refreshing-with-caching-disabled/m-p/677667#M63194</guid>
      <dc:creator>CharlesGant</dc:creator>
      <dc:date>2014-07-08T17:59:05Z</dc:date>
    </item>
    <item>
      <title>Re: WMS Layers Not Refreshing with Caching Disabled</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/wms-layers-not-refreshing-with-caching-disabled/m-p/677668#M63195</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Still looking for an answer.&amp;nbsp; Does anyone have any guidance on this issue they would like to share?&amp;nbsp; The maps update fine as long as I pan/zoom.&amp;nbsp; Otherwise, no update.&amp;nbsp; I need them to update automatically either on their own, or within a function like above.&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Jul 2014 02:25:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/wms-layers-not-refreshing-with-caching-disabled/m-p/677668#M63195</guid>
      <dc:creator>CharlesGant</dc:creator>
      <dc:date>2014-07-22T02:25:11Z</dc:date>
    </item>
    <item>
      <title>Re: WMS Layers Not Refreshing with Caching Disabled</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/wms-layers-not-refreshing-with-caching-disabled/m-p/677669#M63196</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Assuming you are using the &lt;A href="https://developers.arcgis.com/javascript/jsapi/wmslayer-amd.html"&gt;WMSLayer&lt;/A&gt; class, you are likely running into a caching issue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Essentially, your browser doesn't know the underlying image has changed, as the URL remains the same.&amp;nbsp; This is why panning or zooming gives you the latest image; by changing the extent of your WMS GetMap request, the URL changes, and since it does not exist in your browser cache yet, a new image is downloaded from the service.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;According to the WMSLayer documentation, the &lt;A href="https://developers.arcgis.com/javascript/jsapi/wmslayer-amd.html#refresh"&gt;refresh()&lt;/A&gt; function only works if the disableClientCaching property of the service is set to true.&amp;nbsp; Unfortunately the disableClientCaching property is not listed as a valid property of WMSLayer (it is listed under &lt;A href="https://developers.arcgis.com/javascript/jsapi/arcgisdynamicmapservicelayer-amd.html#disableclientcaching"&gt;ArcGISDynamicMapServiceLayer&lt;/A&gt;, however), but I suspect it may still work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try the following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="javascript" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_14060552629995750 jive_text_macro" jivemacro_uid="_14060552629995750"&gt;
&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;wmsRadarLayer.disableClientCaching = true;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;wmsRadarLayer.refresh();&lt;/SPAN&gt;&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;If that doesn't work, try this:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="javascript" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_1406055272876700 jive_text_macro" jivemacro_uid="_1406055272876700"&gt;
&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;wmsRadarLayer.setDisableClientCaching(true);&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;wmsRadarLayer.refresh();&lt;/SPAN&gt;&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If neither of those work, this option may not be supported for the WMSLayer class, and your only option (other than submitting an enhancement request) would likely be to create your own WMSLayer class whose getImageURL() function includes a random number (or perhaps the present epoch time) as an extra query parameter, such as "&amp;amp;nocache=1406055134".&amp;nbsp; You can find an example of creating a custom WMS Layer here:&amp;nbsp; &lt;A href="https://developers.arcgis.com/javascript/jssamples/layers_custom_wms.html" title="https://developers.arcgis.com/javascript/jssamples/layers_custom_wms.html"&gt;Custom layer - WMS | ArcGIS API for JavaScript&lt;/A&gt;‌&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Jul 2014 18:56:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/wms-layers-not-refreshing-with-caching-disabled/m-p/677669#M63196</guid>
      <dc:creator>JasonGreenlaw</dc:creator>
      <dc:date>2014-07-22T18:56:06Z</dc:date>
    </item>
  </channel>
</rss>

