W3C home > Mailing lists > Public > www-math@w3.org > November 2005

Re: Browser Sniffing for MathML

From: Mikko Rantalainen <mikko.rantalainen@peda.net>
Date: Wed, 23 Nov 2005 16:53:43 +0200
Message-ID: <43848277.3030001@peda.net>
To: Bruce R Miller <bruce.miller@nist.gov>
Cc: www-math@w3.org

Bruce R Miller wrote:
> Hi all;
>  I'm working on a project where both MathML and math images will
> be available, but the selection _really_ needs to be automatic;
> a `gateway' page, or similar, would be extremely awkward; 
> standard `content negotiation' doesn't really see mathml support....
> So, I'm apparently stuck with browser sniffing.
> I suppose most who've thought about it have encountered the
> "^Mozilla/5.*" and "^.*MathPlayer.*" patterns, but they really
> aren't quite right (many versions of Mozilla w/o MathML, esp
> Mac, until just recently;  does MathPlayer 1 get matched?....)

I'm currently looking for "MathPlayer 2.0" and "Gecko/200[567]" but 
it really depends on what kind of support you're looking for. You 
might want to add "Camino.*MathML-Enabled".

Mozilla/Gecko does supports MathML in most cases but Mozilla/Gecko 
doesn't include all the required fonts. It correctly reports to user 
if he is missing some fonts, but for a casual user that isn't good 
enough. The same applies to even MathPlayer, just to lesser extent. 
For example, MathPlayer doesn't include fonts for &notni; or &nsup; 
If you're sure that the formulas you're trying to display render 
correctly with just MathPlayer installed, then checking for it 
/should/ be safe. Except that MSIE 6.0 / Windows XP allows user to 
disable the MathPlayer in Plugin Manager (IIRC) and disabling the 
plugin doesn't remove the "MathPlayer" string from user agent. So 
you cannot _really_ trust to that either!

I provide an option to force MathML on regardless of detected user 
agent and another option to force display of images regardless of 
detected user agent.

In an ideal world, user agent would list supported technologies in 
"Accept:" HTTP header and the server could just check if 
application/mathml+xml is accepted. The bottom line with MathML is 
that the user agent really should be able to display pretty much all 
of unicode but there isn't a single font anywhere that would contain 
all the required glymphs.

URLs the check:

And the reason Mozillas has not fixed this issue? They're afraid 
that the "Accept" header could end up taking too much space and 
slowing down modem users:


Received on Wednesday, 23 November 2005 14:54:14 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:27:37 UTC