Friday, August 2, 2013

Applet Not Loading - HTML5

I was asked to debug an issue that was coming up in a colleague's application while he is on vacation this week.  The problem is that intermittently the applet that allows a user to drag a file to a section on the webpage and save it to a network location loads most of the time but not all of the time.  Users are having to close and reload the page to get the applet to load.

I looked in the log files to determine that occasionally the .jnlp file and the .jar file are loaded within a second of each other while most of the time the are loaded simultaneously.  I went through logs for an hour. 

Then someone walks up and takes a look at the actual code with me and we find that we're using the <applet> tag.  Hmmm.  What version of HTML are we using?  5.  OK.  Let's look up the applet tag.

http://www.w3schools.com/tags/tag_applet.asp

You'll notice that HTML5 does not support the <applet> tag.  We're going to change it to <object> and see if that works any better.  This will probably take a couple of weeks to be implemented, so I will be back with a definite answer when this is resolved!