|
||||||||||||||||
|
Browsers / MathML browser support for MathML...
How does a web author deal with the fact that not all browsers are capable of rendering MathML? We will take a look at this question and suggest some coding methods to help make your MathML website run as seamlessly as possible.
+ Firefox (full support for MathML) (users must install the MathML fonts).
This browser renders MathML extremely well and acts in a courteous way if users hit such pages without having the required fonts installed - they simply are unable to see the characters.
+ IE (support for MathML in the form of the MathPlayer plug-in).
This browser is very impolite to users who hit pages containing MathML that do not have the required plug-in.
The content type 'application/xhtml+xml' (used for pages containing MathML) appears not to be generally supported
and, as such, users who hit MathML pages without having the plug-in installed will get an error message to the
effect 'Cannot view XML input using style sheet.', meaning nothing to the average user (and very little to the
experienced user).
This behaviour is particularly irritating to web authors and specialized coding must be put in place to deal with it (see below).
+ Amaya (full support for MathML). This browser renders MathML very well, but may not be fully stable yet
(read the small section on Amaya in the introduction of Arun Ram's MathML for mathematics research articles - he offers a few constructive comments on this browser).
This is an intriguing browser, and well worth a try.
+ Opera (ver. 9.25, Feb 2008) (no support for MathML). While this browser can not render MathML, it does not hang or
do other horrible things when you hit a page containing it. It does not object to the "xhtml+xml" content type, as does IE (without the plug-in) and is, in fact, a very courteous, well-behaved browser in all respects.
+ Safari (ver. 3, public beta, Feb 2008) (no support for MathML) - I had no luck with the installation of this program, however, the version I tried was only a beta and therefore, I withhold my comments until a later date.
(Know of browser that can render MathML? Please drop me a line, I'll be happy test it and list the results.)
IE is the only browser above that requires special treatment by the web author publishing MathML. The other browsers that can't render MathML or require fonts to render it properly, act politely when such pages are hit - meaning that they render everything on the page except the MathML which makes it relatively obvious to the user that their browser does not have the required resources to view the page in question.
This IE-problem can be overcome by running your site from scripts (PHP is probably the most common scripting language today)
and having every page containing MathML examine the user's browser environment by way of code such as the following
(in Perl):
my $browser_env = $ENV{'HTTP_USER_AGENT'}; # This gets the user's browser environment.
my $indexOfMSIE = index($browser_env, 'MSIE'); # Test for Microsoft Internet Explorer (MSIE).
my $indexOfMathPlayer = index($browser_env, 'MathPlayer'); # Test for MathPlayer plug-in.
if( ($indexOfMSIE > -1) && ($indexOfMathPlayer == -1) )
{
# [ IE being used ] AND [ MathPlayer plugin NOT installed ].
#
# Display a web page explaining to the user that a plug-in is required to view the present MathML page content.
}
else
{
# [ IE NOT being used ] OR [ IE being used AND MathPlayer plugin IS installed ].
#
# Display your page containing MathML.
}
If the first 'if' is hit above - so that IE is being used to access a MathML page without having the plug-in
installed - display a very simple HTML page
such as this one
(the source for this page is below, feel free to use it).
A single click inside the text-area will select all.
Copyright © 2008-2010 MathToWeb.com / Paul Hunter MathToWeb is Open Source software. | contact me | privacy policy |