Select to view content in your preferred language

Issue with 304 Result in IE on Feature Server Request

1021
2
Jump to solution
07-12-2013 12:16 PM
MeleKoneya
Frequent Contributor
We have a JavaScript web application running on IIS that allows users to delete and add features using an ArcGIS 10.0 Feature Server and we recently encountered a new issue.  

When a Feature is deleted from the map, it is removed from the SDE database and from the current view.   However, when zooming out, the feature can be seen at other map extents if it existed when the application was started.     Also, if a feature is added,  it is shown in the current view,  but cannot  be seen at other views.    The feature remains selectable as well.
To investigate the issue,   we used Fiddler and IE Developer tools to see the requests.      In the IE Developer Tools, we can see that the Requested Query on the Feature Layer is getting a cached copy of the Query and not going back to the Server because the Result shows a 304 code.  

To test this out,  I changed my IE browser to  ???Always refresh from server???  and this resolved the issue,  but I would like the Tiled services to utilize cached data and this is an all or nothing setting.

\We are using the ON_DEMAND mode on the Feature Layers used for editing

We had not seen this until a recent republish of the website.

I don???t think it is practical to force our users to change their browser settings.

Is there a setting in IIS that can be used to change this behavior or something in the application that is making this happen?         

Thanks,

Mele
0 Kudos
1 Solution

Accepted Solutions
ShreyasVakil
Frequent Contributor
There is a similar thread which talks about this issue.

View solution in original post

0 Kudos
2 Replies
ShreyasVakil
Frequent Contributor
There is a similar thread which talks about this issue.
0 Kudos
MeleKoneya
Frequent Contributor
Thanks for the link to the existing thread.

I ended up using this code from the linked forum post in the init function and it looks promising for fixing our issue:

esri.setRequestPreCallback(function (ioArgs) {
        try {
            if (ioArgs.url.indexOf("FeatureServer") > -1 &&
            ioArgs.content.returnGeometry == true) {
                ioArgs.preventCache = true;
            }
            return ioArgs;

        } catch (e) {
            console.log(e.toString());
            return ioArgs;
        }
    });
0 Kudos