I have the following js:
someframe.location = some_url; // The page is pretty small but the server takes a long time to return it
SomeFunction(); // This funciton takes a long time to execute
For some reason JS first executes the function and only then starts loading the page. For obvious reasons, this takes a long time, when it shouldn't. What i want it to do is send the request to the server and then execute the function while the server is replying. So the question is, how can I force JS to start loading the page immediately?
someframe.location = some_url; // The page is pretty small but the server takes a long time to return it
SomeFunction(); // This funciton takes a long time to execute
For some reason JS first executes the function and only then starts loading the page. For obvious reasons, this takes a long time, when it shouldn't. What i want it to do is send the request to the server and then execute the function while the server is replying. So the question is, how can I force JS to start loading the page immediately?