Feature Layer Refresh not working in IE

7807
15
07-27-2010 05:15 AM
RaviKonaparthi
New Contributor II
Hi All,

When i update any feature the REST endpoint is updated but the featurelayer which is already present on the map is not getting updated. I tried featureLayer.refresh(), but this works fine in firefox but dosen't work in IE. Can anyone help me on some workarounds if any?

Regards,
Ravi.
0 Kudos
15 Replies
Donald_EricPimpler
New Contributor II
I'm experiencing the same problem.  Refresh on a FeatureLayer works in Firefox but not IE.  Anyone know more about this problem?
0 Kudos
Donald_EricPimpler
New Contributor II
Just wanted to see if anyone else has had this problem or knows of a solution to this?
0 Kudos
KellyHutchins
Esri Frequent Contributor
Eric,

I haven't noticed this issue, is it only reproducible with a particular version of IE? Any details you can provide on how to reproduce the issue would be helpful.

Thanks
Kelly
0 Kudos
MarcelKleinmann
New Contributor
I had massive problems with IE recently aswell. So here just a short hint:

1. use Internet Explorer 8, latest version
2. avoid to use this tag or similar on top: <meta http-equiv="X-UA-Compatible" content="IE=7" />
3. use API version 2.1
4. if you declare dojo seperately with <script type="text/javascript" src="http://o.aolcdn.com/dojo/1.4.2/dojo/dojo.xd.js"></script>, use the appropriate version, that fits your API version see here

best luck !
0 Kudos
RyanTwilley
New Contributor
I'm just running in to the same problem. I have an editing app for a feature class in Server 10. I am forcing the issue by creating or deleting features in another browser window, then calling refresh() on the feature layer in question but am not seeing an update.

It seems like the images for the layer are being cached by the browser which is then being stubborn about releasing them when I call refresh() to update them. When I zoom in or out, the updated data is reflected, but when I zoom back to the original extent, I still see the old data for a while. I'm also seeing similar things happening with Chrome. Has anyone found a workaround for these types of problems?
0 Kudos
ShaunWeston
Occasional Contributor
Is there any update on how to resolve this issue?
0 Kudos
MarkSmith
New Contributor III
This works for us:

In IE go to Tools>Internet Option, and in the General Tab click the Settings button against Browsing History.  Then check the 'Every time I visit the webpage' option.

Mark.
0 Kudos
ShaunWeston
Occasional Contributor
I ended up finding this config - autorefresh="5" to put in the Flex API, not sure about Javascript.
0 Kudos
OzanEmem
New Contributor II
This works for us:

In IE go to Tools>Internet Option, and in the General Tab click the Settings button against Browsing History.  Then check the 'Every time I visit the webpage' option.

Mark.


how can you do this on your clients machine using JS?

anyway;
we are having this problem in IE9. Mode is MODE_SNAPSHOT. Basically refresh() reads data from cache instead of querying the service. For example Mark's solution works but there is no way to force users to select that option in their browser settings.
we added
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<META HTTP-EQUIV="CACHE-CONTROL" CONTENT="NO-CACHE">
<META HTTP-EQUIV="Expires" CONTENT="-1">
elements in our html file. it helped solving that issue in some cases, but not always.
more oddly; same code works in one page, but wont in the another.

in order to determine the issue, we also tried removeAllLayers() and adding them again to replicate refresh() with success.

application works well on all other browsers.
0 Kudos