I had to solve a very similar issue while preparing the G4EF toolbar.

Actually you may use XMLHttpRequest to get the page. [[ You can use it to transfer not only HTTP stream but also XML ]].
But I faced a lot of problem while accessing the DOM of the downloaded page.

So, I had to create a hidden frame and open the page within it.