Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > XML > XHTML page displays as source in WinME

Reply
Thread Tools

XHTML page displays as source in WinME

 
 
Quadibloc
Guest
Posts: n/a
 
      02-13-2008
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
 
Reply With Quote
 
 
 
 
Martin Honnen
Guest
Posts: n/a
 
      02-13-2008
Quadibloc wrote:

> 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.


Firefox 2 on Windows XP shows me the source of that page and that
happens because the page is served as text/plain.
If you want to serve your .xhtml documents as XHTML then make sure you
configure you server to serve .xhtml documents as application/xhtml+xml.



--

Martin Honnen
http://JavaScript.FAQTs.com/
 
Reply With Quote
 
 
 
 
Quadibloc
Guest
Posts: n/a
 
      02-13-2008
On Feb 13, 6:46 am, Martin Honnen <mahotr...@yahoo.de> wrote:
> Quadibloc wrote:
> > 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.

>
> Firefox 2 on Windows XP shows me the source of that page and that
> happens because the page is served as text/plain.
> If you want to serve your .xhtml documents as XHTML then make sure you
> configure you server to serve .xhtml documents as application/xhtml+xml.


Well, that's a design flaw in Firefox. Except for saving the file with
the extension .xhtml instead of .htm, to indicate that it's an XHTML
file, I have no control over things like that. It isn't "my" server.

Or, rather, it is "my" server, but it isn't my server.

The conventions for the Internet should be devised so that everything
works perfectly even in the usual model of a "personal web page"
hosted on an ISP, where one saves the pages of one's site as files in
the appropriate directory. Requiring people to run their own servers
so as to have privileged access to their workings... ought to be
limited to the really exotic stuff for which it is necessary.

In WinXP, at least I had different behavior when I looked at the page
as a local file - I didn't try accessing the site on the servers from
there, as I first noticed the problem in WinME looking at the local
file. Possibly XP does something extra locally then.

John Savard
 
Reply With Quote
 
Andreas Prilop
Guest
Posts: n/a
 
      02-13-2008
On Wed, 13 Feb 2008, Quadibloc wrote:

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


| Server: Apache/1.3.27 (Unix) (Red-Hat/Linux) mod_fastcgi/2.2.12 mod_perl/1.26
| Content-Type: text/plain

> Well, that's a design flaw in Firefox.


It's rather a flaw in your skills. If you don't even know about
HTTP headers and Content-Type, don't mess with XHTML.

> Except for saving the file with
> the extension .xhtml instead of .htm, to indicate that it's an XHTML
> file, I have no control over things like that. It isn't "my" server.


Read http://httpd.apache.org/docs/1.3/mod/mod_mime.html .

--
Solipsists of all countries - unite!
 
Reply With Quote
 
Martin Honnen
Guest
Posts: n/a
 
      02-13-2008
Quadibloc wrote:
> On Feb 13, 6:46 am, Martin Honnen <mahotr...@yahoo.de> wrote:
>> Quadibloc wrote:
>>> 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.

>> Firefox 2 on Windows XP shows me the source of that page and that
>> happens because the page is served as text/plain.
>> If you want to serve your .xhtml documents as XHTML then make sure you
>> configure you server to serve .xhtml documents as application/xhtml+xml.

>
> Well, that's a design flaw in Firefox. Except for saving the file with
> the extension .xhtml instead of .htm, to indicate that it's an XHTML
> file, I have no control over things like that. It isn't "my" server.




Sorry, I completely disagree, if the server sends a resource with the
HTTP Content-Type header text/plain then Firefox is doing the right
thing by displaying the text sent. The suffix of a URL does not matter,
what matters is the Content-Type header sent.


--

Martin Honnen
http://JavaScript.FAQTs.com/
 
Reply With Quote
 
Quadibloc
Guest
Posts: n/a
 
      02-14-2008
On Feb 13, 7:44 am, Martin Honnen <mahotr...@yahoo.de> wrote:

> Sorry, I completely disagree, if the server sends a resource with the
> HTTP Content-Type header text/plain then Firefox is doing the right
> thing by displaying the text sent. The suffix of a URL does not matter,
> what matters is the Content-Type header sent.


Well, I found the answer to my question.

I did *not* have to re-program the server, I just needed to put in a
meta tag, so I did have control over content-type from within the text
of my page.

It winds up that I needed *three* different versions of the page. One
that legacy browsers could display, one that shows the MathML in IE
with the DesignScience plug-in, and one that works in Mozilla Firefox.

John Savard
 
Reply With Quote
 
Quadibloc
Guest
Posts: n/a
 
      02-14-2008
On Feb 13, 7:37 am, Andreas Prilop <aprilop2...@trashmail.net> wrote:

> It's rather a flaw in your skills. If you don't even know about
> HTTP headers and Content-Type, don't mess with XHTML.


Turned out I can control the HTTP header with a meta tag.

I didn't really have a choice: Amaya can display MathML in a plain
HTTP page, but IE and Firefox both *insist* on XML at the least or
XHTML. And they like different flavors.

But I got it to work.

John Savard
 
Reply With Quote
 
Richard Tobin
Guest
Posts: n/a
 
      02-14-2008
In article <c123ef57-1d5d-4407-b336->,
Quadibloc <> wrote:

>I did *not* have to re-program the server, I just needed to put in a
>meta tag


That *is* re-programming the server

-- Richard
--
:wq
 
Reply With Quote
 
Quadibloc
Guest
Posts: n/a
 
      02-14-2008
On Feb 13, 6:43 pm, rich...@cogsci.ed.ac.uk (Richard Tobin) wrote:
> In article <c123ef57-1d5d-4407-b336-9f9304f9a...@e4g2000hsg.googlegroups.com>,
>
> Quadibloc <jsav...@ecn.ab.ca> wrote:
> >I did *not* have to re-program the server, I just needed to put in a
> >meta tag

>
> That *is* re-programming the server


It gives the server the information it needs, but it does not produce
a permanent change in the server's behavior that affects other pages.

John Savard
 
Reply With Quote
 
Johannes Koch
Guest
Posts: n/a
 
      02-14-2008
Quadibloc schrieb:
> On Feb 13, 6:43 pm, rich...@cogsci.ed.ac.uk (Richard Tobin) wrote:
>> In article <c123ef57-1d5d-4407-b336-9f9304f9a...@e4g2000hsg.googlegroups.com>,
>>
>> Quadibloc <jsav...@ecn.ab.ca> wrote:
>>> I did *not* have to re-program the server, I just needed to put in a
>>> meta tag

>> That *is* re-programming the server

>
> It gives the server the information it needs, but it does not produce
> a permanent change in the server's behavior that affects other pages.


Which HTTP server reads HTML meta tags and then changes the Content-Type
header accordingly?

--
Johannes Koch
In te domine speravi; non confundar in aeternum.
(Te Deum, 4th cent.)
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Web-page that *BOTH* changes current page + displays a Pop-up pagefrom JavaScript John L. Javascript 10 05-18-2009 09:27 AM
XHTML page displays as source in WinME Quadibloc HTML 12 02-17-2008 09:28 PM
Resolved -- Re: Simple page displays once then shows only source!? Mark Adams HTML 0 11-13-2005 06:43 PM
Classic asp date displays- changing over to aspnet date object displays Chumley Walrus ASP .Net 1 12-16-2004 09:57 PM
what is URL command that displays source instead of page? David W. Deley Javascript 1 06-29-2004 06:45 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57