?
Solved

For Duz or another online marketing expert

Posted on 2005-04-18
8
Medium Priority
?
242 Views
Last Modified: 2013-11-19
What is the best way to hide javascript and other tracking code from search engine spiders?
I'm performing some SEO changes with our website and feel this would help improve the site in search engines.
The code is unreadable by spiders, but it slows down the spidering process and contributes to low text:code ratios.
I'm looking for the best way to improve text:code ratios and speed up the spidering process...

Any suggestions?
~trail
0
Comment
Question by:trailblazzyr55
  • 4
  • 4
8 Comments
 
LVL 20

Author Comment

by:trailblazzyr55
ID: 13811287
I realize that puting JS in an external file will help, most all the code is, but is there anything more I can do?
0
 
LVL 33

Expert Comment

by:humeniuk
ID: 13811649
Putting all your javascript, etc. into external files is a good start.

Another important factor is to use web dev methods that are effective, efficient, and standards compliant.  For example, using a css-based layout is far more efficient than a table-based design, which will inherently be plagued by bloated code that will be very difficult to validate.

The key is to simplify your code to make it easier for the spiders to digest and get through it.  For example, which of these is easier to understand . . .

<strong><font color="#CCCCCC" size="24px">Your Page Header Here</font></strong>

     or

<h1>Your Page Header Here</h1>   ?

In the latter case, the attributes are defined in an external CSS file.  The benefit is not just that there is less code and less clutter, but also the fact that the contents of  a <h1> header soon (or immediately) after your <body> tag will be heavily weighted by the search engines.  If it contains one or more of your intended keywords, it will be very potent.

These elements have to be used together.  In a typical table-based design with a big masthead, lots of javascript or flash menus (etc.), your content, including your header will be inherently forced down your page - you will frequently see such pages where the real content doesn't begin until the second half of the html page.  You want your keywords to appear 'early and often' on the page.  This means on the code page, not on the web page as it appears in the browser.  This can more easily be accomplished with a good css-based layout.
0
 
LVL 33

Expert Comment

by:humeniuk
ID: 13811659
BTW - you may find this handy: www.stargeek.com/code_to_text.php.
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
LVL 20

Author Comment

by:trailblazzyr55
ID: 13820614
humeniuk,

stargeek.com seems to be a very useful site! Thanks for the suggestion.

Does anybody know of a tool that will simulate a search engine and how it views primarely javascript, or what it sees when it indexes your page? I'm editing my scripts and creating statements to hide the javascript from the search engine, but I need a tool to see if it's working. Anyone have any ideas?

thanks,
~trail
0
 
LVL 33

Accepted Solution

by:
humeniuk earned 2000 total points
ID: 13824432
A search engine spider works something like an unsophisticated text browser.  Most javascript is inherently ignored by spiders altogether.  There are several simulators online, for example: www.webmaster-toolkit.com/search-engine-simulator.shtml.  

The webmaster toolkit site has several other handy tools.
0
 
LVL 20

Author Comment

by:trailblazzyr55
ID: 13863346
humeniuk,

Thanks for the help, I found a way through CF to hide javascript completely from search engine spiders, these two sites..

1)www.stargeek.com/code_to_text.php
2)www.webmaster-toolkit.com/search-engine-simulator.shtml

were also very helpful, thanks for your input :o)

~trail
0
 
LVL 33

Expert Comment

by:humeniuk
ID: 13863384
Glad to be able to help, trailblazzyr.  Thanks for the A.

The CF solution sounds interesting.  You may want to consider posting some info about it here (if possible) as it may be very useful to future readers.
0
 
LVL 20

Author Comment

by:trailblazzyr55
ID: 13863609
yeah not a bad idea,

what I found was better being I was using coldfusion was to hide the javascript when engine spiders index the page. But when the page is visited the scripts are all available. I have page that detects browsers and puts them in a list named say, MyBrowserList. Then I would do something like this..

<cfif MyBrowserList IS "yes"><cfelse> ---the code to hide---</cfif>

basically checks from the browser list if it is being spidered, if so hides the code, but has no affect when viewing the pages.

Thanks for your ideas and comments,
humeniuk
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

In today's business world, data is more important than ever for informing marketing campaigns. Accessing and using data, however, may not come naturally to some creative marketing professionals. Here are four tips for adapting to wield data for insi…
This holiday season, we’re giving away the gift of knowledge—tech knowledge, that is. Keep reading to see what hacks, tips, and trends we have wrapped and waiting for you under the tree.
This tutorial walks through the best practices in adding a local business to Google Maps including how to properly search for duplicates, marker placement, and inputing business details. Login to your Google Account, then search for "Google Mapmaker…
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.
Suggested Courses
Course of the Month16 days, 15 hours left to enroll

862 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