XHTML page displays as source in WinME

Discussion in 'HTML' started by Quadibloc, Feb 13, 2008.

  1. Quadibloc

    Quadibloc Guest

    I have been working on my page at

    http://www.quadibloc.com/math/ideint.htm

    and after some effort, I managed to get the MathML to display properly
    in Amaya 8.54; it had been created to work with Amaya 2.0. This
    required changing the page to conform to XHTML rules.

    To get it to display also in Internet Explorer with the DesignScience
    MathPlayer plug-in and in Mozilla Firefox, which now supports MathML,
    I had to go one step further, and rename the page to

    http://www.quadibloc.com/math/ideint.xhtml

    and this works when I'm booted into WinXP.

    When I'm in Windows ME, IE works on my page. And Mozilla Firefox will
    let me see

    http://baruchel.free.fr/~thomas/notebook.xhtml

    correctly, as well as Mozilla's own test page.

    But when I try to look at *my* page with the .xhtml extension... I see
    the page source, as if Firefox had never *heard* of xhtml! Doubtless,
    I'm doing _something_ wrong...

    John Savard
     
    Quadibloc, Feb 13, 2008
    #1
    1. Advertising

  2. Quadibloc wrote:
    > I have been working on my page at
    >
    > http://www.quadibloc.com/math/ideint.htm
    >
    > and after some effort, I managed to get the MathML to display properly
    > in Amaya 8.54; it had been created to work with Amaya 2.0. This
    > required changing the page to conform to XHTML rules.
    >
    > To get it to display also in Internet Explorer with the DesignScience
    > MathPlayer plug-in and in Mozilla Firefox, which now supports MathML,
    > I had to go one step further, and rename the page to
    >
    > http://www.quadibloc.com/math/ideint.xhtml
    >
    > and this works when I'm booted into WinXP.
    >
    > When I'm in Windows ME, IE works on my page. And Mozilla Firefox will
    > let me see
    >
    > http://baruchel.free.fr/~thomas/notebook.xhtml
    >
    > correctly, as well as Mozilla's own test page.
    >
    > But when I try to look at *my* page with the .xhtml extension... I see
    > the page source, as if Firefox had never *heard* of xhtml! Doubtless,
    > I'm doing _something_ wrong...


    It is not Firefox, you will find the results the same with other
    browsers, it is your server:

    Date: Wed, 13 Feb 2008 15:08:18 GMT
    Server: Apache/1.3.27 (Unix) (Red-Hat/Linux) mod_fastcgi/2.2.12
    mod_perl/1.26 PHP/4.3.3 FrontPage/5.0.2 mod_ssl/2.8.12 OpenSSL/0.9.6b
    Last-Modified: Wed, 13 Feb 2008 13:03:35 GMT
    Etag: "348134-16fe-47b2eaa7"
    Accept-Ranges: bytes
    Content-Length: 5886
    Content-Type: text/plain
    ## NOTE-------^^^^^^^^^^

    As opposed to baruchel.free.fr:

    Date: Wed, 13 Feb 2008 15:10:16 GMT
    Server: Apache/ProXad [Jan 10 2008 05:02:06]
    Last-Modified: Fri, 30 Dec 2005 22:15:50 GMT
    Etag: "7dbe33-197a-43b5b196"
    Accept-Ranges: bytes
    Content-Length: 6522
    Content-Type: application/xhtml+xml
    ^^^^^^^^^^^^^^^^^^^^^
    If you can use .htaccess files with your server that add this to file:

    # add mime type for xhtml extension
    AddType application/xhtml+xml .xhtml

    But do realize that your IE (ver6) will not be able to handle your page,
    you will have to use Firefox to view the page as application/xhtml+xml

    --
    Take care,

    Jonathan
    -------------------
    LITTLE WORKS STUDIO
    http://www.LittleWorksStudio.com
     
    Jonathan N. Little, Feb 13, 2008
    #2
    1. Advertising

  3. Quadibloc

    Quadibloc Guest

    On Feb 13, 8:19 am, "Jonathan N. Little" <> wrote:

    > If you can use .htaccess files with your server that add this to file:
    >
    > # add mime type for xhtml extension
    > AddType application/xhtml+xml .xhtml
    >
    > But do realize that your IE (ver6) will not be able to handle your page,
    > you will have to use Firefox to view the page as application/xhtml+xml


    Turns out a meta tag did the trick. I have a version for IE and a
    different version for Firefox, and they both work now.

    John Savard
     
    Quadibloc, Feb 14, 2008
    #3
  4. Quadibloc wrote:
    > On Feb 13, 8:19 am, "Jonathan N. Little" <> wrote:
    >
    >> If you can use .htaccess files with your server that add this to file:
    >>
    >> # add mime type for xhtml extension
    >> AddType application/xhtml+xml .xhtml
    >>
    >> But do realize that your IE (ver6) will not be able to handle your page,
    >> you will have to use Firefox to view the page as application/xhtml+xml

    >
    > Turns out a meta tag did the trick. I have a version for IE and a
    > different version for Firefox, and they both work now.


    ????

    Your problem is at the server level, how could a meta tag help?


    --
    Take care,

    Jonathan
    -------------------
    LITTLE WORKS STUDIO
    http://www.LittleWorksStudio.com
     
    Jonathan N. Little, Feb 14, 2008
    #4
  5. Quadibloc

    JWS Guest

    Quadibloc wrote:
    > I have been working on my page at
    >
    > http://www.quadibloc.com/math/ideint.htm
    >
    > and after some effort, I managed to get the MathML to display
    > properly

    [..]

    If you let your page load a piece of javascript called
    ASCIIMathML.js
    (http://www1.chapman.edu/~jipsen/mathml/asciimath.html) you can
    get MATHML display in ordinary HTML pages (not XHTML). You write
    your formulas using a very simple notation, and the Javascript
    translates them 'on the fly' into MATHML. This works in all MATHML
    capable browsers (in IE you must install MathPlayer for this).
    Much easier than coding MATHML by hand.

    For an example, see my page http://www.jw-stumpel.nl/bounce.html

    Regards, Jan
     
    JWS, Feb 15, 2008
    #5
  6. Quadibloc

    Quadibloc Guest

    On Feb 15, 1:07 am, JWS <> wrote:
    > Quadibloc wrote:
    > > I have been working on my page at

    >
    > >http://www.quadibloc.com/math/ideint.htm

    >
    > > and after some effort, I managed to get the MathML to display
    > > properly

    >
    > [..]
    >
    > If you let your page load a piece of javascript called
    > ASCIIMathML.js
    > (http://www1.chapman.edu/~jipsen/mathml/asciimath.html) you can
    > get MATHML display in ordinary HTML pages (not XHTML). You write
    > your formulas using a very simple notation, and the Javascript
    > translates them 'on the fly' into MATHML. This works in all MATHML
    > capable browsers (in IE you must install MathPlayer for this).
    > Much easier than coding MATHML by hand.
    >
    > For an example, see my pagehttp://www.jw-stumpel.nl/bounce.html


    But that forces people visiting my web site to enable JavaScript.

    If I was a Fortune 500 company, I could expect that people might trust
    my site not to damage their computers, but with the Internet the way
    it is, surely for ordinary web pages that's not a reasonable
    expectation.

    Most of my site is _very_ accessible. Only a few pages require support
    for tables. Math formulas on other pages are done using ASCII art.

    I'm trying to demo MathML using one page, so far. As for writing
    MathML by hand, I am using Amaya to write it, then I correct its
    output by hand.

    John Savard
     
    Quadibloc, Feb 16, 2008
    #6
  7. Quadibloc

    Quadibloc Guest

    On Feb 13, 9:20 pm, "Jonathan N. Little" <> wrote:
    > Quadibloc wrote:
    > > On Feb 13, 8:19 am, "Jonathan N. Little" <> wrote:


    > > Turns out a meta tag did the trick. I have a version for IE and a
    > > different version for Firefox, and they both work now.

    >
    > ????
    >
    > Your problem is at the server level, how could a meta tag help?


    Well, if the server were to deign to read the meta tag, and act on its
    contents, it might.

    Maybe my own site admin abilities let me change the type of a page
    somehow; I'll visit the console and have a look, but I doubt it.

    Firefox on another computer still showed text/plain; the page that
    worked on IE with MathPlayer worked with Firefox on *that* computer. I
    am quite puzzled.

    John Savard
     
    Quadibloc, Feb 16, 2008
    #7
  8. Quadibloc wrote:
    > On Feb 13, 9:20 pm, "Jonathan N. Little" <> wrote:
    >> Quadibloc wrote:
    >>> On Feb 13, 8:19 am, "Jonathan N. Little" <> wrote:

    >
    >>> Turns out a meta tag did the trick. I have a version for IE and a
    >>> different version for Firefox, and they both work now.

    >> ????
    >>
    >> Your problem is at the server level, how could a meta tag help?

    >
    > Well, if the server were to deign to read the meta tag, and act on its
    > contents, it might.


    No they are not.

    > Maybe my own site admin abilities let me change the type of a page
    > somehow; I'll visit the console and have a look, but I doubt it.
    >


    Since you are on an apache server maybe you have the ability to use an
    ..htaccess file

    create a plain text file and name it ".htaccess", note the leading dot.
    content should be:

    # add XHTML
    AddType application/xhtml+xml .xhtml


    > Firefox on another computer still showed text/plain; the page that
    > worked on IE with MathPlayer worked with Firefox on *that* computer. I
    > am quite puzzled.


    Because Firefox obeys the ContentType sent from the server, IE is
    "extension-based". Microsoft uses the file extension to determine what a
    file is and how it should be handled. That is how Windows works built
    not how the web or other OSes work.

    You can prove it. In notepad make a file named "plaintext.txt", write
    "Hello World" Save it, make copies and rename them "plaintext.doc",
    "plaintext.zip", "plaintext.exe" if you try to open them see what
    happens with each. Windows will even try to run the "plaintext.exe", of
    course it will fail. That is not how the rest of the world works. So in
    your problem you have to get the server to send the file with the proper
    content type. Either via the .htaccess by associating the extension
    ..xhtml with xhtml or using a server side script to send the correct
    header. Note that by setting the header the file extension won't matter.

    <?php
    header('Content-Type: text/html');
    echo '<html><head><title>HTML</title></head>';
    echo '<body><p>via <b>HTML</b></p></body></html>';
    ?>

    <?php
    header('Content-Type: application/xhtml+xml');
    echo '<html><head><title>XHTML</title></head>';
    echo '<body><p>via <b>XHTML</b></p></body></html>';
    ?>

    <?php
    header('Content-Type: plain/text');
    echo '<html><head><title>TEXT</title></head>';
    echo '<body><p>via <b>plain text</b> see the markup!</p></body></html>';
    ?>


    --
    Take care,

    Jonathan
    -------------------
    LITTLE WORKS STUDIO
    http://www.LittleWorksStudio.com
     
    Jonathan N. Little, Feb 16, 2008
    #8
  9. Quadibloc wrote:
    > On Feb 15, 1:07 am, JWS <> wrote:
    >> Quadibloc wrote:
    >>> I have been working on my page at
    >>> http://www.quadibloc.com/math/ideint.htm
    >>> and after some effort, I managed to get the MathML to display
    >>> properly

    >> [..]
    >>
    >> If you let your page load a piece of javascript called
    >> ASCIIMathML.js
    >> (http://www1.chapman.edu/~jipsen/mathml/asciimath.html) you can
    >> get MATHML display in ordinary HTML pages (not XHTML). You write
    >> your formulas using a very simple notation, and the Javascript
    >> translates them 'on the fly' into MATHML. This works in all MATHML
    >> capable browsers (in IE you must install MathPlayer for this).
    >> Much easier than coding MATHML by hand.
    >>
    >> For an example, see my pagehttp://www.jw-stumpel.nl/bounce.html

    >
    > But that forces people visiting my web site to enable JavaScript.


    For folks with IE you're going to force them to do something one way or
    another else all they'll get is a download dialog box.


    --
    Take care,

    Jonathan
    -------------------
    LITTLE WORKS STUDIO
    http://www.LittleWorksStudio.com
     
    Jonathan N. Little, Feb 16, 2008
    #9
  10. Quadibloc

    Quadibloc Guest

    On Feb 16, 7:38 am, "Jonathan N. Little" <> wrote:

    > Since you are on an apache server maybe you have the ability to use an
    > .htaccess file


    Thank you very much; that appears to have been the solution to the
    problem.

    John Savard
     
    Quadibloc, Feb 16, 2008
    #10
  11. Quadibloc

    Quadibloc Guest

    On Feb 15, 1:07 am, JWS <> wrote:
    > You write
    > your formulas using a very simple notation, and the Javascript
    > translates them 'on the fly' into MATHML. This works in all MATHML
    > capable browsers (in IE you must install MathPlayer for this).
    > Much easier than coding MATHML by hand.


    Also, it might be noted that so few browsers support MathML...
    although one very popular one, Mozilla Firefox, does so. There is some
    JavaScript that translates (a subset of) MathML into commands non-
    MathML capable browsers can understand - *that* I ran across, and
    found somewhat more interesting.

    But I agree coding MathML by hand is not the best.

    Why, oh why, did they drop the <MATH>...</MATH> of HTML 3.0, which
    would have been a good and convenient solution for everyone, using an
    easy TEX-like syntax?

    John Savard
     
    Quadibloc, Feb 16, 2008
    #11
  12. Quadibloc

    JWS Guest

    Quadibloc wrote:

    > Why, oh why, did they drop the <MATH>...</MATH> of HTML 3.0,
    > which would have been a good and convenient solution for
    > everyone, using an easy TEX-like syntax?


    Does anyone in this group know? I totally agree that TEX syntax
    (familiar to all scientists) would have been a natural thing to
    include directly in HTML. HTML after all was invented by
    high-energy physicists, people who always write their papers in
    (LA)TEX.

    BTW ASCIIMathML.js allows writing formulas in TEX syntax as well.
    Forcing people to use Javascript is of course a Bad Thing, but it
    is better than displaying formulas as ASCII art, or including them
    as images (which IMHO is totally unspeakable, because it is so
    ugly in printing; after all the work Donald Knuth did, so many
    years ago, to make mathematical formulas print perfectly).

    BTW (2) MATHML support in browsers is slowly improving. It seems
    the latest Opera has MATHML support (and will, therefore, work
    with ASCIIMathML.js). And of course IE has MATHML support through
    Mathplayer. I think Safari (on Macintosh) does MATHML as well.

    Regards, Jan
     
    JWS, Feb 16, 2008
    #12
  13. Quadibloc

    Quadibloc Guest

    On Feb 16, 9:52 am, JWS <> wrote:
    > Quadibloc wrote:


    > > Why, oh why, did they drop the <MATH>...</MATH> of HTML 3.0,
    > > which would have been a good and convenient solution for
    > > everyone, using an easy TEX-like syntax?


    > Does anyone in this group know?


    Personally, I suspect it's because XML is the wave of the future,
    MathML has the structured syntax of XML, and those wicked, lazy people
    who don't want to write <br /> and <li>...</li> can always run out and
    buy visual page construction software instead of trying to write pages
    by hand!

    Old-style HTML is evil and unstructured, and must be banished from the
    world!

    As you may guess from the way I characterize this point of view, I
    have little sympathy with it. Web standards are made to serve people;
    people are not made to serve web standards.

    John Savard
     
    Quadibloc, Feb 17, 2008
    #13
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Vanga Sasidhar
    Replies:
    1
    Views:
    452
    Bruno Sirianni
    Apr 3, 2004
  2. Chumley Walrus
    Replies:
    1
    Views:
    12,239
    =?Utf-8?B?QnJpYW4gQnJvd24=?=
    Dec 16, 2004
  3. Mark Adams
    Replies:
    0
    Views:
    376
    Mark Adams
    Nov 13, 2005
  4. Quadibloc
    Replies:
    15
    Views:
    675
    Quadibloc
    Feb 16, 2008
  5. Joel VanderWerf

    detecting Win95/Win98/WinME

    Joel VanderWerf, Jan 19, 2004, in forum: Ruby
    Replies:
    10
    Views:
    245
    Emmanuel Touzery
    Jan 21, 2004
Loading...

Share This Page