My application displays an Esri map, by accessing the Esri public sampleserver. I use Esri dojo API for this purpose. The Esri dojo I use is of version 1.6 and is locally installed (as a war) on my server. It's important to say that the rest of my dojo code is an older dojo version (1.3.2).
I use Firefox 3.6 and the strange thing is, I sometimes get a "Could not load cross-domain resources" message (at about 10% of my attempts). This problem happens more often on another pc (Firefox 3.6 as well): at about 80% of my attempts. It is usually (but not necessarily) solved after clearing Firefox cookies and cache.
Now, I know the code is ok, as I can see the map in most of my attempts. However, I can't figure out why it sometimes fails on my browser, and why the other browser almost constantly fails.
What do you think? What could be the cause for it?
[GIS] A random “Could not load cross-domain” message when loading Esri map
arcgis-javascript-apidojo
Best Answer
Dvedatta, I did what you suggested and installed firebug on that browser in order to view the net tab.
Surprisingly, installing firebug solved the problem: the map started appearing at about 90% of my attempts, just like in the first pc I tried. In my opinion, the reason for the failures is the fact that the Esri server is remote, and the map load delays due to networking issues. I think that firebug delays the page load and therefore the map has enough time to load too. I think that a permanent solution would be changing the browser's timeout programmatically.