How to preload a signed applet without user being asked security question?
When someone visits my web site, they spend a minute or so on the welcome page before proceeding to the applet page.
I've read about preloading applet classes (done in the welcome page) to make the applet load quicker once the user proceeds...
But my classes are in a signed jar, and I want them to be pre-loaded by the welcome page without presenting the user with the security question dialogue.
Is it possible?
Thanks,
James
[465 byte] By [
jhodgskia] at [2007-11-26 20:05:09]

# 1
Depends what you mean by preloading. You could preload the Jar to the client by loading it via Javascript in the welcome page. That gets it downloaded and hopefully into the browser cache (provided the headers are correct - some webservers seem to hav issues here) so it will save you the download time.
What you can't do is preload the classes into the VM without the security dialog, because that violates the whole principle behind the security.
So, you can save the download time for the Jar, but you can't preload the classes themselves.
# 3
Itchy,
I've created the following javascript function:
function retrieveJars() {
alert("about to load jar...");
jar1 = new Object();
jar1.src = "applet.jar";
alert("...jar loaded. About to load cab...");
jar2 = new Object();
jar2.src = "applet.cab";
alert("...cab loaded.");
}
which I call with onload="retireveJars()"
but the three alerts appear very rapidly, making me think the jar and cab haven't been retrieved... Is there more code I need, or am I barking up the wrong tree?
Thanks,
James