Quadibloc wrote:
> On Feb 13, 9:20 pm, "Jonathan N. Little" <lws4...@central.net> wrote:
>> Quadibloc wrote:
>>> On Feb 13, 8:19 am, "Jonathan N. Little" <lws4...@central.net> 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