Currently Being ModeratedAug 20, 2013 6:09 AM (in response to Athk10)
It is possible to make this happen on purpose, by messing up the MIME configuration of your web server. When a web server returns a page it also returns a MIME type for it so that the browser knows what do to with it. The mime type that should be returned for an HTML page is 'text/html', but if your server is instead returning 'text/plain' or no MIME type at all then the browser may simply display the page as text.
Take a look at your server stup. Did you modify any of the configuration, especially anything that mentions MIME ?
If your browser has a 'debug' feature see if you can get it to show you the MIME type that was returned with the page. Or you can use this command
curl -I http://my.url
in Terminal and it will show you various things about the page returned. If this shows that the MIME type is correct then it's more likely that the bug is in your web browser than in your server setup.
Another problem may come with strange characters in your web page. If you have edited your web page 'index.html' with a word processor (e.g. Word) rather than a text processor (e.g. TextEdit) then strange characters may have sneaked in there which make it impossible to render correctly. This might cause a browser to give up and show it as text instead.
Currently Being ModeratedAug 20, 2013 7:46 AM (in response to Simon Slavin)
Here. It looks as if the MIME type is correct ("text/html"). I should mention that this occurs in all of my browsers (Nightly, Chrome, Chrome Canary, Safari). I have even tried rewriting the simple HTML for the webpage on my Xserve in textedit. No luck. For the meantime, I have formatted it using Textedit. Somehow you can use rich text formatting in HTML. I have no problem with this right now, but I would like to embed videos and add photos, backgrounds, and links. You can see the webpage here: http://adamthk.no-ip.org
Currently Being ModeratedAug 20, 2013 8:52 AM (in response to Athk10)
There's nothing wrong with that homepage as seved by your server. If it looks funny in your browsers then there's something wrong somewhere else.
No, you're not using Rich Text formatting as HTML. TextEdit is writing HTML code for you, since you tried to edit an HTML source file.
Currently Being ModeratedAug 20, 2013 9:52 AM (in response to Simon Slavin)
I think there's been a misunderstanding.. The current set up is not how I want it to be. I cannot embed when I use the formatting in TextEdit. This is my scrappy HTML in my browser. This is NOT how I want it to be seen. I have to use an HTML set up because I need embedding, etc. I cannot embed using TextEdit.
In the meantime, I have changed the Webserver set up so you can see the problem as I do (http://adamthk.no-ip.org). I have added the index.html with only this code included. I have checked the MIME settings and there is no problem. I want to be clear that I do NOT want to use textedit's built-in HTML generator. Let me know if I'm being too ambiguous. Thanks
Currently Being ModeratedAug 21, 2013 4:24 AM (in response to Athk10)
As you have seen from the 'show source', TextEdit is no longer saving in HTML mode. TextEdit does not know how to encode the new things you put in the file as HTML so it is not saving in HTML mode. It's saving the text you put in as text, and then, because you told it to, making a web page which shows that text. It's possibly the 'iframe' that TextEdit doesn't know how to present.
You either need to use a proper WYSIWYG HTML file editor or learn HTML and do your editing yourself by messing with the HTML code.
You can still use TextEdit to hand-edit the code by changing this setting:
Open and Save tab
Ignore rich text commands in HTML files <-- untick this box
then try opening the file again and you'll see the text that's really in the file. You can copy the text so far out of your existing browser window.
Currently Being ModeratedAug 21, 2013 7:24 AM (in response to Simon Slavin)
Wow that was the problem all along! Thanks!