Free content for your website, newsletters or ezines. Free articles for reprint | Lbry.com
corner Set as Homepage   |   Add to Favourites corner
 
Search for
Need more search features? Go to Advanced Search
 
 
Article Categories
Advertising
Direct Mail, PPC, Word of Mouth
Advice
Affiliate Programs
MLM
Arts
Auto & Trucks
Auto Leasing, Diesel vs. Gasoline Vehicles
Awards
Beauty, Personal Care & Grooming
Business & Finance
Finance, Management, Marketing, Sales
Careers
Communications
Computers & Internet
CD Duplication, Computers FAQs
Copywriting
EBooks
ECommerce
Education
Email
Entertainment
Environment
Family
Child Care
Food & Drink
Cooking & Recipes
Free
Furniture
Office Chairs
Gadgets & Gizmos
Games
Gardening
Gifts
Government
Health
Hair Loss, Headaches, Healthy Eating, Natural Cures
History
Hobbies
Boat Acquisition
Home Business
Home Improvement
Humour
Internet
Blogs, CGI, CSS, DHTML, HTML, Javascript, RSS
Kids and Teens
Law
Marriage
Men's Issues
Metaphysical
Motivational
Music & Movies
Newsletters
Online Business
Organization & Time Management
Parenting
Personal Security & Wellness
Credit Repair, Life Insurance
Pets & Animals
Cats, Dogs
Politics & Government
Press Releases
Psychology
Publishing
Real Estate
Home Mortgage
Recreation & Sports
Fitness, Mountain Biking, Tennis
Reference
Relationships
Religion & Faith
Scams
Science
Weather
Search Engines
Link Popularity, SE Optimization, SE Positioning, SE Tactics, Sitemaps
Self Help
Sexuality
Shopping
Signs & Astrology
Society
Work Life
Technology
Bluetooth, Podcasting
Travel & Adventure
Beach Vacations, Ski Vacations
True Life Stories
Websites
Domain Names, Site Promotion, Web Development, Web Hosting
Weight Loss
Women's Issues
Writing
 
 »  Home  »  Search Engines  »  SE Tactics  »  Using External Coding To Improve Search Engine Placement
Using External Coding To Improve Search Engine Placement
By George Peirson | Published  11/28/2005 | SE Tactics | Unrated
Using External Coding To Improve Search Engine Placement
George Peirson
George Peirson: George Peirson is a successful Entrepreneur, Internet Trainer and author of over 30 multimedia based tutorial training titles. Read more articles by George Peirson at www.howtogurus.com/free-articles.html  

View all articles by George Peirson


If you answered yes to any of these questions your site may be driving away search engine spiders and losing search engine position ranking.

As you can imagine search engine spiders have a lot of pages to get through on the web when they are indexing sites. To improve their speed and efficiency search engines program their spiders to give up easily if they have problems with a page or if they have to wade through too much code to find the relevant content.

This is one of the reasons why it is so important to put your keywords as close to the top of the page as possible. This way the search bot will see the keywords before giving up and moving on to the next page.

But what do you do if you have lots of JavaScript code or CSS styles pushing your keywords down the page in your coding? You need to find a way to cut down on all that code that gets in the way of the search engines properly indexing your page.

We do this by moving the JavaScript and CSS styles off the page and into external files. This is a fairly easy and straight forward process and can have the added benefit of making your pages load faster as well, which the search engines also like.

In many ways CSS styles and JavaScript work in a similar fashion. You set up functions in a script or formatting in a style sheet section, and then refer to that section in your html code. For instance if you have a JavaScript that displays a clock on your page you would have the JavaScript functions for the clock listed in your head section, then you would simply call that function from the place on the page where the clock would be displayed.

Similarly with CSS you set up your styles ahead of time in a Styles section of the page head, then you simply refer to the styles as needed in your html coding. One benefit of this is that it cuts down dramatically on the amount of formatting code needed when compared to using Font tags.

If you want to use the same JavaScript or CSS styles on a different page you could copy all that code onto the new page. But this would cause two distinct problems, first you would be adding a lot of code to each page and second if you wanted to make a change to the JavaScript or CSS styles you would need to do so on every page that the code had been copied onto.

Both of these problems can be solved simply by using external files. You create one external file for your CSS and another file for your JavaScript. These could be named mysite.css for the CSS and mysite.js for the JavaScript. These files can be created in any plain text editor or html code editor, they are nothing more than files that contain most of the CSS or JavaScript code from the web pages.

With JavaScript you have an opening JavaScript tag, then a comment tag, then assorted functions and what not, followed by a closing comment tag and a closing JavaScript tag. Your external file would start with the opening comment tag, contain all the functions and such, and end with the closing comment tag. You would leave both the opening and closing JavaScript tags in the html page. If you have more than one JavaScript on the page you can move all the code into one external js file. Simply copy it into the file in the same order as it exists in the JavaScript tags on the html page. You will only need the one pair of opening and closing comment tags.

Once your JavaScript is moved off the page you will need to tell the web page where to find it. This is done in the JavaScript tag that was left on the page in the head section. Right now this will be an opening JavaScript tag placed right up against the closing JavaScript tag, with no additional code in between. You will place the reference to the external JavaScript code inside the opening JavaScript tag like this:

script language="JavaScript" type="text/JavaScript" src="mysite.js"

Placing CSS styles in an external file is handled in exactly the same manner. Move the styles into the external file, and then refer to that external file with your style tag in the head section of the web page like this:

link href="mysite.css" rel="stylesheet" type="text/css"

An added benefit of moving the code into external files is that you can then change the styles of your whole site simply by changing the code in the one external file.

Once you have moved the code into external files you will have greatly simplified the code on each page. This will take you a long way towards making your pages lean and mean, and very search engine friendly.

You can find sample external files for this article on my web site at: www.howtogurus.com/free-articles.html

Copyright 2005 - George Peirson
Note: Republishing this article is permitted in the following conditions:
 
author by-lines are kept intact and unchanged. Hyperlinks and/or URLs provided by authors must remain active.
 
 
a link to the Lbry.com site is required in the use of articles either as print or an active url on the articles web page as below:
[ Article from Lbry.com ]
How would you rate the quality of this article?
1 2 3 4 5
Poor Excellent
Tell us why you rated this way (optional):

Send to Author Post on Site

 
Comments


Article Options
Most popular articles

»

Dementia: Will I Get It?

By N/A | Published 12/31/1969 | Health | Rating:
In the article Dementia: Just What Is It, we have learned about a frightening term, Dementia, and just what it is or, rather, how it manifests itself in the human condition. I gave 5 examples from my personal knowledge, including myself.
 
  Read the full article   Print this article  
Report An Error    

»

Triumphing Over Tantrums

By N/A | Published 12/31/1969 | Family | Rating:
Patty Hone
 
  Read the full article   Print this article  
Report An Error    

»

Celebrex Law Suits Looking Like a Strong Case

By N/A | Published 12/31/1969 | Law | Rating:
There is no data as yet that indicates how many former patients of Pfizer's anti-inflammatory and painkilling drug are filing Celebrex law suits, but given the magnitude of the company's perceived crime it is likely that there will be very many. And even a quick perusal of the alleged behaviour of the company regarding this drug seems to point to Celebrex law suits being something of a fait accompli.
 
  Read the full article   Print this article  
Report An Error    

»

Checked Into Nirvana. Where Is Joy?

By N/A | Published 12/31/1969 | Metaphysical | Rating:
Eckhart Tolle lived upto his twenty ninth year in a state of almost continual anxiety interspersed with periods of suicidal depression. Then he woke up one night with a feeling of absolute dread. The silence of the night, the vague outlines of the furniture in the dark room, the distant noise of a passing train - everything felt so alien, so hostile, and so utterly meaningless that it created in him a deep loathing of the world. "I cannot live with myself any longer." This was the thought that kept repeating itself in his mind. Suddenly he became aware that if he could not live with himself, there had to be two - he and the "self" he could not live with. He was stunned by the realization. He became enveloped by powerful feelings.
 
  Read the full article   Print this article  
Report An Error    
No popular articles found.
 
Become an Author
 
Are you a writer and you want your work published?
 
 
Do you have a website and need free publicity?
 
 
Sign up for free as a Lbry.com author and have your articles published in no time!
Click here to become an author
 
Advertising
 
 
 
 
Lbry.com Sponsors