PDA

View Full Version : ScriptTag store interfere each other in firefox



racke
29 Jun 2008, 11:33 PM
I have multiple stores with Script tag proxies in a page,

When I load second store before the first store return a response.
I found that the second one could not read data after the first store get loaded under the firefox
Although in firebug, the second response is already loaded than the first one.

After some investigation, I found that in firefox the script tag callback function is always loaded in sequence.
Ex.


<script id='first' type="text/javascript" src='URL1'>
CALLBACK1 function
</script>

<script id='second' type="text/javascript" src='URL2'>
CALLBACK2 function
</script>

If you create first, and then second script tag in sequence, although the second response is returned early, it would not invoke CALLBACK2 until CALLBACK1 is invoked.

That cause issues, if the first request is timeout, it would cause second request to fail as well.

While in IE it works fine.
Does anyone has any solution on this?

Thanks in advance.
-R