<?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 exportwebmap - how to make file name unique so resultant PDF is not cached by browser in ArcGIS Enterprise Questions</title>
    <link>https://community.esri.com/t5/arcgis-enterprise-questions/exportwebmap-how-to-make-file-name-unique-so/m-p/441165#M17053</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; We are using the export web map service to provide for the creation of PDFs in our web applications.&amp;nbsp; Usually this works nicely.&amp;nbsp; However, ArcGIS server seems to reuse file names after clearing the output directory.&amp;nbsp; We have had users creates more than a handful of PDFs, and because their browser has cached the previous PDFs, instead of fetching a new PDF, it shows an older cached PDF.&amp;nbsp; Is there a way of making the file names unique over a certain period of time?&amp;nbsp; The file names have a nice long string which I assume is unique to my server/service, but the last three digits are the only part that changes for each PDF, and they seem to get reused far too often.&amp;nbsp; For example : _ags_8d9ea50233b940c081faca4a2a81af629.pdf.&amp;nbsp; The only part of the file name that changes for this service is the last three digits "629", and they only go from 621 to 629, and then they get reused.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 26 Aug 2013 22:55:01 GMT</pubDate>
    <dc:creator>SebastianRoberts</dc:creator>
    <dc:date>2013-08-26T22:55:01Z</dc:date>
    <item>
      <title>exportwebmap - how to make file name unique so resultant PDF is not cached by browser</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/exportwebmap-how-to-make-file-name-unique-so/m-p/441165#M17053</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; We are using the export web map service to provide for the creation of PDFs in our web applications.&amp;nbsp; Usually this works nicely.&amp;nbsp; However, ArcGIS server seems to reuse file names after clearing the output directory.&amp;nbsp; We have had users creates more than a handful of PDFs, and because their browser has cached the previous PDFs, instead of fetching a new PDF, it shows an older cached PDF.&amp;nbsp; Is there a way of making the file names unique over a certain period of time?&amp;nbsp; The file names have a nice long string which I assume is unique to my server/service, but the last three digits are the only part that changes for each PDF, and they seem to get reused far too often.&amp;nbsp; For example : _ags_8d9ea50233b940c081faca4a2a81af629.pdf.&amp;nbsp; The only part of the file name that changes for this service is the last three digits "629", and they only go from 621 to 629, and then they get reused.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Aug 2013 22:55:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/exportwebmap-how-to-make-file-name-unique-so/m-p/441165#M17053</guid>
      <dc:creator>SebastianRoberts</dc:creator>
      <dc:date>2013-08-26T22:55:01Z</dc:date>
    </item>
    <item>
      <title>Re: exportwebmap - how to make file name unique so resultant PDF is not cached by bro</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/exportwebmap-how-to-make-file-name-unique-so/m-p/441166#M17054</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; you may want to try controlling the clean up time of your output directory. By default the output folder is cleaned up after 10 minutes which may be too often in your case. In ArcGIS Server Manager, log as an administrator, go to 'site', then 'directories' and edit the output folder clean up time increasing the time.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Ismael&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Aug 2013 01:05:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/exportwebmap-how-to-make-file-name-unique-so/m-p/441166#M17054</guid>
      <dc:creator>IsmaelChivite</dc:creator>
      <dc:date>2013-08-27T01:05:38Z</dc:date>
    </item>
    <item>
      <title>Re: exportwebmap - how to make file name unique so resultant PDF is not cached by bro</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/exportwebmap-how-to-make-file-name-unique-so/m-p/441167#M17055</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;SRRoberts,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The problem got fixed in 10.1 SP1.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;While you are waiting on updating to SP1, Ismael's suggestion is perfectly a valid workaround.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Aug 2013 04:47:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/exportwebmap-how-to-make-file-name-unique-so/m-p/441167#M17055</guid>
      <dc:creator>TanuHoque</dc:creator>
      <dc:date>2013-08-27T04:47:24Z</dc:date>
    </item>
    <item>
      <title>Re: exportwebmap - how to make file name unique so resultant PDF is not cached by bro</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/exportwebmap-how-to-make-file-name-unique-so/m-p/441168#M17056</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Sebastian,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;My apology, it got fixed in 10.2.&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://support.esri.com/en/bugs/nimbus/role/beta10_1/TklNMDkwMjA0"&gt;http://support.esri.com/en/bugs/nimbus/role/beta10_1/TklNMDkwMjA0&lt;/A&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Tanu&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Aug 2013 15:28:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/exportwebmap-how-to-make-file-name-unique-so/m-p/441168#M17056</guid>
      <dc:creator>TanuHoque</dc:creator>
      <dc:date>2013-08-27T15:28:26Z</dc:date>
    </item>
    <item>
      <title>Re: exportwebmap - how to make file name unique so resultant PDF is not cached by bro</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/exportwebmap-how-to-make-file-name-unique-so/m-p/441169#M17057</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;It would be nice to have a better workaround for this in 10.1. Increasing the cleanup time of the output directory won't really help.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Is it possible to configure http headers returned by arcgis server to tell the browsers not to cache the output images?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Sep 2013 07:38:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/exportwebmap-how-to-make-file-name-unique-so/m-p/441169#M17057</guid>
      <dc:creator>OttarViken_Valvåg</dc:creator>
      <dc:date>2013-09-27T07:38:26Z</dc:date>
    </item>
    <item>
      <title>Re: exportwebmap - how to make file name unique so resultant PDF is not cached by bro</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/exportwebmap-how-to-make-file-name-unique-so/m-p/441170#M17058</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Actually, I found an easy workaround on the client, for those who have control over what it does. I add a timestamp to the url so that it's always unique. Now the browser won't used the cached file even though the filename is the same, since I added a unique query parameter.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;this.executePrint({ &amp;nbsp;&amp;nbsp;&amp;nbsp; template: "MAP_ONLY", &amp;nbsp;&amp;nbsp;&amp;nbsp; format: format, &amp;nbsp;&amp;nbsp;&amp;nbsp; preserveScale: false, &amp;nbsp;&amp;nbsp;&amp;nbsp; showAttribution: false, &amp;nbsp;&amp;nbsp;&amp;nbsp; exportOptions: exportOptions }).then(lang.hitch(this, function (result) { &amp;nbsp;&amp;nbsp;&amp;nbsp; var url = result.url + "?ts=" + new Date().getTime(); // Add timestamp to avoid browser caching &amp;nbsp;&amp;nbsp;&amp;nbsp; window.open(url); })&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Sep 2013 08:28:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/exportwebmap-how-to-make-file-name-unique-so/m-p/441170#M17058</guid>
      <dc:creator>OttarViken_Valvåg</dc:creator>
      <dc:date>2013-09-27T08:28:14Z</dc:date>
    </item>
    <item>
      <title>Re: exportwebmap - how to make file name unique so resultant PDF is not cached by bro</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/exportwebmap-how-to-make-file-name-unique-so/m-p/441171#M17059</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Ottar,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; Thanks, that works perfectly!&amp;nbsp; For anyone using the tax parcel viewer, you can change the window.open line in the submitPrintRequest function in the utils.js file to:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;window.open(data.results[0].value.url +&amp;nbsp; "?ts=" + new Date().getTime() );&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If you are using the print widget in Flex, if you can edit and recompile the&amp;nbsp; print widget, then change the printTask_executeCompleteHandler function&amp;nbsp; in the&amp;nbsp; ExportWebMapForm.mxml as follows:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;var date:Date = new Date();
var dateString:String = "" + date.fullYear + (date.month+1) +&amp;nbsp; date.date + date.hours +&amp;nbsp; date.minutes + date.seconds
navigateToURL(new URLRequest(dataFile.url + "?ts=" + dateString ));&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 19:45:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/exportwebmap-how-to-make-file-name-unique-so/m-p/441171#M17059</guid>
      <dc:creator>SebastianRoberts</dc:creator>
      <dc:date>2021-12-11T19:45:11Z</dc:date>
    </item>
  </channel>
</rss>

