PluginDetect Java Example # 5
In this example we divide Java detection into 2 stages. Stage 1 uses only non-applet methods for detection, and is very fast.
Stage 2 uses applet methods, and can be slow due to Java starting up.
Stage 1 does a FAST Java detection before the window loads. Stage 1 uses only OTF and does not instantiate the Java plugin.
If stage 1 successfully detects Java, then detection is completed. If stage 1 fails to detect anything, then we wait for the window to
fully load and then stage 2 begins.
Stage 2 does a SLOW Java detection after the browser window has loaded. Stage 2 uses both OTF and NOTF, and does instantiate the Java plugin.
The reason why stage 2 is slow is that it takes some time to start up the Java RunTime Environment.
Because starting up Java can sometimes be slow, you might want to avoid performing stage 2 at the beginning of your web page. The startup time would greatly increase the time needed for the entire web page to render.
Of course, an alternative here would be to perform stage 2 right before the closing
</body> tag.
--------- End of page ---------