Jmol Applet/Browser Support
Browser support for the Jmol applet using Jmol.js
This page tries to explain and document what the Jmol.js javascript library is doing to insert applets depending on the user's browser. It will hoepfully lead to discussion about future implementation.
According to Jmol version 12.0.21.
Jmol.js runs some tests to anticipate browser compatibility and to decide how to insert the Jmol applet in the pages.
Browser compatibility
The "isFullyCompliant" test includes both "isBrowserCompliant" and "isJavaCompliant".
"isJavaCompliant" just checks if "navigator.javaEnabled()" returns true or false.
"isBrowserCompliant" works basically in this way:
- If 'document.getElementById' exists, then "isBrowserCompliant" passes.
- Exceptions:
- Linux/Unix Konqueror 3.3 or below
- Mac Opera 7.54 or below
- Mac Internet Explorer
- Mac Safari 125.12 or below
Caveats:
- Detection is based on browser sniffing, which is in general terms a method not recommended to adapt web content to browsers. The rationale is probably that some specific browsers proved not to be compatible with Jmol.
- Some (recent) browsers are therefore not being taken care of. (e.g. Safari in Windows, Chrome)
HTML tag for the applet
The history of inserting Java applets in pages is long and complex, and there has been permanent debate over methods, standards and actual practice. Details will not be given here.
In summary, there are 3 ways an applet can be inserted into an html page:
- Use an
<applet>
tag. - Use an
<object>
tag adequate for MS Internet Explorer. - Use an
<object>
tag adequate for other browsers.