The other day I had a customer who’s site would not load in Internet Explorer. It would load in Firefox, but Internet Explorer would just choke and given an usual error saying it could not load the site. At first I thought may be it was a time-out issue as I could not duplicate on our internal network. Then the customer told me they tried to load their site at their local library and with Internet Explorer with the same results. I took a look at the site on the computer we have that is not connected to our internal network and has a pure connection the Internet. Internet Explorer started loading the site, but then gave up and popped up the error unable to load.
Okay, so this issue had to be something to do with the coding. I looked the page in Firefox, nothing real fancy: simple background, some images and text. However, one thing I noticed odd was the size of the HTML file on the server. For such a simple page, the file was sure big. So I did a view source…Oh my! Soon as I saw the source this ‘blooper’ sign below from Arizona Roads came to mind (the sign was mounted upside down).
For a divided highway to end, as this sign indicates, it has to be divided in the first place
I asked the famous question, “So, how did you build this page?”. The customer replied that someone else had built it for them. They also added they had gone in and attempted to add META tags for SEO (Search Engine Optimization) purpose. Whoever built the page originally coded it rather poorly. The first issue was there was no DOCTYPE deceleration. Then I saw a closing HEAD tag, but NO opening head tag. A header is trying to be closed that hasn’t been opened in the first place. Getting past this I saw why the HTML file was so bloated. There were may be five lines of CSS declarations along with an opening BODY tag which were repeated at least twenty times (if not more). Well, no wonder Internet Explorer was having issues.
I wish I had still had Chrome installed on my machine at work, I would have loved to see how it would have handled this garbled mess of coding. Firefox ignores that bad coding and tries as best it can to still display the page. In this Firefox displayed the page perfectly, ignoring the redundant CSS declarations, missing DOCTYPE and even the improper header.
The caller also informed me that they knew just enough HTML to be dangerous (so true here) and admitted they probably made it worse when they went in to add the META Tags. Upon asking for suggestions I refereed them over to W3 Schools.