Is there a way to check from a Java Application when a browser has
finished loading the contents of a url? I use the following command to
kick off Internet Explorer from my Java Application:
Process p = Runtime.getRuntime().exec("rundll32
url.dll,FileProtocolHandler " + "http://www.somewebsite.com");
Thanks
lewmania942@yahoo.fr - 03 Mar 2006 02:46 GMT
> Is there a way to check from a Java Application when a browser has
> finished loading the contents of a url?
I can't answer your question.
But for some site there's no such thing as a page "done" loading. Some
sites using (warning buzzword coming) "AJAX technology" keep
transferring data constantly between the browser and the server and
keep refreshing the page (more usually "some part of the page")
constantly.
When would such a site be considered to be done loading?
Jon Martin Solaas - 04 Mar 2006 09:23 GMT
> Is there a way to check from a Java Application when a browser has
> finished loading the contents of a url? I use the following command to
[quoted text clipped - 4 lines]
>
> Thanks
Embed a proxy in your application and monitor the traffic to IE.
Embed the browser itself in your application (need to be java-based,
though ...)
Try to control IE via JNI or some sort of COM-bridge.
Wrap IE in a small VB app or something that will notify your java
program when done loading. Or use a browser that lets you define various
actions, like notifying your application, on certain events, like when
the page is loaded.
Download the content in your application (like a web-spider), store on
disk and point IE there. Or, if you have a caching webproxy installed,
just assume the content will load instantly from cache when IE accesses
it afterwards.
It's already been pointed out that it's not always possible to determine
when a resource has been fully loaded. Done executing code embedded in a
page and done downloading content is also two different things ...