Solved

Page shows code instead of formatted text and images 130111

Posted on 2013-01-11
4
433 Views
Last Modified: 2013-01-15
Hello expert,

Created an html page to help sell my house.
http://www.allenpitts.com/7147/7147_Flyer.html

Got several calls from prospective buyers saying:
'The page display as html code.'
When I tested at my computer (IE 9) it works fine.
But using Firefox it displays code and so also on the
iPhone.

I tried using HTM in instead of html and removed

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

No luck, I surmise that the browser, when it display code,  
thinks the file is text instead of html code but not sure how
to get it to display.

Allen in Dallas
0
Comment
Question by:9apit
  • 2
4 Comments
 
LVL 10

Expert Comment

by:stu215
ID: 38768692
I just tried in Firefox v17.0.1 & IE 9 and it works fine... It does not work in Safari v5.1.2 though.

The markup all seems correct.

What kind of server are you hosting this file on? or do you use a hosting company?
-- I've seen something similar where I had a client trying to host his website on a NAS device.

Assuming it is on a NAS device and not an actual webserver:
They make files accessible on the web but are not true webservers and do not interpret the HTML as html... The reason it would work in some browsers is because some newer browsers are smart enough to do the interpretation themselves.
0
 
LVL 10

Expert Comment

by:stu215
ID: 38768713
Had another thought that you may be correct if you did it on a windows machine in notepad and then made the extension .html it wouldnt have really changed the extension and may be interpreted as text like you think.

To check on a win 7 machine:

Go to Start Menu -> Control Panels -> Folder Options -> "View" tab

and then UNcheck "hide extensions for known file types"

This will then show the full extension on the file and you should be able to modify it to just:
fileName.html
0
 
LVL 13

Accepted Solution

by:
Ugo Mena earned 500 total points
ID: 38768825
no character encoding or parsing mode is detected.

The pragma directive should be used for pages written in HTML 4.01. It should also be used for XHTML 1.x documents served as HTML, since the HTML parser will not pick up encoding information from the XML declaration.

Use a pragma directive at the top of the head element.

<meta http-equiv="Content-type" content="text/html;charset=UTF-8">

Correct this and then you can double check yourself with the following HTML validator:

http://validator.w3.org
0
 

Author Closing Comment

by:9apit
ID: 38780509
Didn't work but the best answer I got
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Styling your websites can become very complex. Here I'll show how SASS can help you better organize, maintain and reuse your CSS code.
SASS allows you to treat your CSS code in a more OOP way. Let's have a look on how you can structure your code in order for it to be easily maintained and reused.
This Micro Tutorial will demonstrate how to add subdomains to your content reports. This can be very importing in having a site with multiple subdomains.
How to create a custom search shortcut to site-search Experts Exchange using Google in the Firefox browser. This eliminates the need to type out site:experts-exchange.com whenever you want to search the site. Launch your Bookmark Menu: Press 'Ctrl +…

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now