Finewedges.com Finewedges.com Finewedges.com
   Index :> About Us :> Privacy Policy :> Terms of Use :> Add Your Link :> Add Your Article
Search:   
Add Url
 

Relationship & Lifestyle

Investment & Finance

People & Communities

Recreation & Entertainment

Self Management

Sports & Adventure

Games & Play

Health & Hygiene

Property & Estate

Automobile & Automotive

Companies & Business

Medical Care

Tour & Travel

Creative Arts

Children

Home Family & Garden

Science & Space

Shopping & Auction

Eating & Drinking

Education & Learning

Politics & Government

Jobs & Careers

News & Events

Internet & Computers

 

Index » Internet & Computers » Web Development Services
 

Fixing Yahoo Webhosting Validation Problem

 

Recently, I was attempting to validate a page for a client's web site using the HTML Validation Tool and had some interesting and unexpected results. The document failed validation which was strange since I routinely make it a point to double check all of my markup before even uploading the page to the testing server. Determined to get to the bottom of this, I diligently went about inspecting the results and noticed something very peculiar. The errors were the result of HTML that I didn't put on the page. "How can this be?" I wondered. "Where did this come from?"

It turns out that the code was inserted by Yahoo in order to track site statistics, which I suppose is okay - kind of. There are two major problems with this, the first being the code is inserted after the tag and the other is it isn't even valid markup. Now, this is the appropriate time for a disclaimer to mitigate the number of people ready to jump on me. Normally I would not use Yahoo's Webhosting. However, based on past experience I have found their Small Business Merchant Solution makes building an e-commerce site a cost-effective solution for the client and makes updates to the product database very simple.

Getting back to the issue at hand, after a little digging around on the Yahoo help documents I was able to come up with the following solution that will block Yahoo from amending the markup and allow the site to validate.

First, lets start by taking a look at the original markup:

<!-- text below generated by server. PLEASE REMOVE --> <!-- Counter/Statistics data collection code --> <script language="JavaScript" src="http://hostingprod.com/js_source/geov2.js"></script> <script language="javascript">geovisit();</script> <noscript> <img src="http://visit.webhosting.yahoo.com/visit.gif?us1138276907" alt="setstats" border="0" width="1" height="1"> </noscript> <IMG SRC="http://geo.yahoo.com/serv?s=76001524&t=1138276907" ALT=1 WIDTH=1 HEIGHT=1>

The first step to fixing the problem is to turn off site statistics by doing the following:

1. Sign in to your Web Hosting plan.

2. On the Home tab, in the Site Activity module, click the "Site Statistics" link.

3. Click the "Options" link in the upper-right corner of the Site Statistics page.

4. Toward the bottom of the page, select the radio button accompanying "Do not collect statistical data for my site (turn off site statistics)."

5. Click the "Save" button.

This will stop Yahoo from adding this code to your webpages.

Next, we need to take a look at the tracking code and fix the errors. The first error is the "language='JavaScript'" attribute which is depreciated and no longer used. It has been replaced with the "type='text/JavaScript'" attribute. The second error is in the SRC attribute for the image, it's simply the unencoded "&" which should be "&". So with that taken care of here's the updated code block:

<!-- Counter/Statistics data collection code --> <script type="text/JavaScript" src="http://hostingprod.com/js_source/geov2.js"></script> <script type="text/JavaScript">geovisit();</script> <noscript> <img src="http://visit.webhosting.yahoo.com/visit.gif?us1138276907" alt="setstats" border="0" width="1" height="1"> </noscript> <IMG SRC="http://geo.yahoo.com/serv?s=76001524&amp;t=1138276907" ALT=1 WIDTH=1 HEIGHT=1>

Simply insert the above code into the tags of all your web sites pages and violla and if the rest of your markup is correct the page will validate.

Of course, an even simpler and perhaps better solution would be to simply find another hosting company. But, like I mentioned earlier, in the case of a small to medium e-commerce site Yahoo really is perhaps the most viable option. I would be remiss if I didn't add that I am really dissapointed in Yahoo though. If they are going to be inserting their own code into other peoples HTML, they should at least make sure it is valid and placed in the proper location. Coming up in a future post I'll be showing how to validate HTML which contains Flash, since the Macromedia markup used thoughout the web is abysmal and not even close to being valid HTML.

Author: William Mandra
 
Author Bio:
William Mandra is a reputable writer. William likes to scribble articles about this industry.
 
 
 

Related Articles

 
Email Glitches and How to Solve Them
 
How to Accurately Measure the Customer Support Level of Your Small Business Web Hosting Provider
 
Email Advertising Services
 
Want Your Website Visitors to Return?
 
Traffic Generation Basics - Your Marketing Plan
 
Can You Become A Millionaire with A Yahoo Store?
 
A List of Essential Tools You Should Have When Working on a PC
 
Color Scheme for Your Website?
 
Online Affiliate Program Blog: The Correct Way To Use It
 
How To Improve AdSense Revenue
 
 
 
Index :> Privacy Policy :> Terms of Use
Copyright © 2008 www.finewedges.com