AnsweredAssumed Answered

Geoprocessing Hangs In Internet Explorer

Question asked by elepner on Sep 11, 2015
Latest reply on Jan 12, 2017 by flspat

Hi!

 

We're running geoprocessor from JS in our project using Geoprocessor.submitJob function.

 

What Geoprocessor class does:

  1. Posts job on ArcGIS Server
  2. Each second checks the status of this job
  3. Returns result when job status is success.

BUT IE stops checking on 2nd step because geoprocessor uses same url each time to check the status like https:/yourarcgis.company.com/arcgis/rest/services/Viewer/GpToolName/GPServer/ToolName/jobs/j05436c7786db4b1c9cc89582081a87f8

It means that the procedure never ends because the query result falls into cache and IE doesn't make query and returns 'esriJobExecuting' status. I checked that and saw that there was no real queries to the server.

However everything works fine with other browsers. Is there any way to prevent caching?

Now I'm using the following approach to modify URL parameter but it's a bit dirty solution which I don't like:

 

window.require(["esri/request"], function (esriRequest) {

    esriRequest.setRequestPreCallback(function (ioArgs) {

        //Prevent IE from caching queries to check status URL. Just additional parameter to the query to status URL.

        if (cacheBust) {

            ioArgs.url += '&buster=' + new Date().getTime();

        }

        return ioArgs;

    });

});

Outcomes