Solved

Page shows code instead of formatted text and images 130111

Posted on 2013-01-11
4
435 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction If you're like most people, you have occasionally made a typographical error when you're entering information into an online form.  And to your consternation, the browser remembers the error, and offers to autocomplete your future entr…
Citrix XenApp, Internet Explorer 11 set to Enterprise Mode and using central hosted sites.xml file.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
Google currently has a new report that is in beta and coming soon to Webmaster Tool accounts. This Micro Tutorial will highlight new features for Google Webmaster Tools.

825 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