Probably the script is being cached. Try changing the url everytime the getScript function is called. This is commonly done by adding a time to the url's query string, like:
Generate a new time with: var t = new Date().getTime(); http://server.url?roomname=alfa&time=[add time here] On Jun 27, 10:29 pm, ZLOAder <zloa...@gmail.com> wrote: > Hi.I want to get real-time statistics about users connected to server. > Server response contains JS-code - var online_users = 1234; > I wrote simple test page: > ... > <meta http-equiv="refresh" content="3;url=index.html"> > ... > <script type="text/javascript" src="js/jQuery/ > jquery-1.2.6.js"> > </script> > ... > $(document).ready(function(){ > $.getScript("http://server.url?roomname=alfa", function > (){ > console.log(online_users); > }); > $.getScript("http://server.url?roomname=beta"", > function(){ > console.log(online_users); > }); > $.getScript("http://server.url?roomname=gamma"", > function(){ > console.log(online_users); > }); > $.getScript("http://server.url?roomname=delta"", > function(){ > console.log(online_users); > }); > }); > > FF, Safari, Opera - works well. Troubles starting with IE. Sometime > code returned from server don't execute. I mean, online_users contains > value from previous request. But at this time response contains renew > data. > > Does anyone have a suggestion? > > Thanks