W3C home > Mailing lists > Public > www-math@w3.org > April 2006

Re: Intractible problems serving web pages with MathML?

From: Richard Kaye <R.W.Kaye@bham.ac.uk>
Date: Fri, 28 Apr 2006 10:41:59 +0100
To: www-math@w3.org
Message-Id: <200604281041.59169.R.W.Kaye@bham.ac.uk>

On Thursday 27 April 2006 15:47, Richard Kaye wrote:

[snip]

> 2. Perhaps I should issue instructions or provide a script to change
> the registry on MS-Windows machines.  I have found a key
> " My
> Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Inter
>net Settings\Accepted Documents"
> which seems to contain the http "accept" header that IE uses.  I changed
> it and I got a different document back.  But I didn't find any
> documentation for this on the web. (I wonder if there are others keys
> I should know about too...)  More particularly, I really do not
> understand why MathPlayer doesn't change this registry key on
> installation to indicate it can now handle application/xhtml+xml.
> That would solve *all* of my problems!  Alternatively, does anyone
> know how to write such scripts?  (I program in unix myself :)
> Of course I would still have to persuade users to run a script from
> an unknown source... ouch!

This turned out to be ridiculously easy for Windows XP or Windows 2000,
and (after a good night's sleep) is currently my favourite solution.  I know
it means asking users to run a script on the client machine, but the script 
is a one-liner:

reg ADD "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet 
Settings\Accepted Documents" /v xhtml /d "application/xhtml+xml" /f

(that's one line with a single space between "Internet" and "Settings" and 
another space between "Accepted" and "Documents")

IE then makes its requests with accept=".... application/xhtml+xml, */*"
and apache's content negotiation rules (with 
 xhtml -> application/xhtml+xml;qs=0.8
 html -> text/html;qs=1
) will mean that text/html is returned in all cases when application/xhtml+xml 
is not specified by the agent.

The only possible problems I see are if:
 - the value name "xhtml" in this key is used for something else
 - another value in this key specifies text/html (if so it needs to be changed
   to text/html;q=0.8 or something)
 - MS changes something or there is *sometimes* another registry key affecting
   things
 - the client runs an earlier version of MS-Windows

There is some logic in the way IE sets its "accept" (except on "refresh" which 
is just crazy).  I really feel MathPlayer should set this registry key on 
installation and, unless anyone spots any other problems, I will suggest it.  
(Is anyone from Design Science reading this list?)

Cheers

Richard
Received on Friday, 28 April 2006 10:31:59 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Saturday, 20 February 2010 06:12:58 GMT