INTERNET MARKETING TIPS and RESOURCES
FREE advise on search engine optimization of your website

Search the Web:



Two Ways To Optimize JavaScripts In Web Pages

Last Update: Thursday, May 25, 2006.

In this article I show you how to optimize your web pages by moving your JavaScript code out of the all-important top portion of the HTML file.

JavaScripts are usually placed in between the <HEAD> section of a page, which pushes your body text containing your important keyword phrases further down the page.

This can affect the number of keywords that search engine spiders index. It could also makes your keywords less relevant because they appear lower on the page.

The solution is to move the JavaScript code away from the top portion of the HTML file. In fact, I will show you two solutions to resolving this problem.

1. The first solution is to move the JavaScript code into a separate file and link to this file from the HTML file.

This is the preferred solution because it:

  • reduces your file size, and therefore your download time.
  • allows you to reuse the code on other pages by simply linking to this file.

Once you have move the JavaScript code to the new file, add the following code to the <HEAD>... </HEAD> portion of the HTML file:

<SCRIPT LANGUAGE="JavaScript" SRC="file-name.js">

</SCRIPT>

You may replace "file-name" with any file name you like.

Please note that external JavaScript files cannot contain any HTML tags. They must contain only JavaScript code.

Some servers may not recognize the ".js" file type. If that is the case with your server, contact your web hosting company and ask them to add the following line to the "mime.types" file in the server's config directory, and then restart the server.

type=application/x-javascript    exts=js

2. The second solution is even simply. All you have to do is move the JavaScript code to the very bottom of the HTML file, below the </HTML> tag.

Yes! It really does work! Although it is considered good programming practice to include your JavaScript within the <HEAD> portion of a HTML file, it isn't necessary.

That's it! Simple isn't it? I highly recommend you use either of these two solutions to optimizing your web pages that contain JavaScript code.

Internet marketing expert.About The Author: Michael Wong is an internationally recognized search engine marketing expert, and the author of a leading search engine book, numerous marketing tips, and reviews of internet marketing software and ecommerce solutions.


Articles of the week

Internet Marketing / Promotion
Business / Sales
Web Design / Development
Biz / Tips
Web Design Tips

RESOURCES CENTER

Easily create and test a Meta Tag that search engines will ''See & Use'' your site.


It is pretty much useless to submit to search engines if a bad choice of keywords are used, or an unseen thus unused meta tag.

Try these FREE Online Tools and breath New Life into your online business


Find the best keywords
to use on your website

Wordtracker - Try this free Trial!
You'll know which are the best keywords to drive more traffic to your sites. Very efficient. A Must Use.


KeywordDiscovery can tell you the search phrases people use to find products and services, as well as the search terms that drive traffic to your competitors


Metatags Generators

www.widexl.com - Widexl designed this Meta Tag analysis tool to help webmasters analyze their web pages. This script analyze not only the Meta Tags but try to use the same spider technology as the spiders them self.


Metatags Analysers

www.widexl.com - Widexl designed this Meta Tag analysis tool to help webmasters analyze their web pages. This script analyze not only the Meta Tags but try to use the same spider technology as the spiders them self.




Affiliates
Highly Recommended


Need a Free Website?



Alternatives
to Search Engines
You want more hits?
Try these fine sites and easily generate traffic to your site.


Free Classified Ads


Traffic Generation!
- Get *free* traffic to your Website Guaranteed! Check it out - It's free!


AdlandPro Free Classified - One of the most visited Classified Websites in the world. Yhey offer free classified ads for everybody. Free ads are the first step and the simplest way to advertise.

TopClassified Adpost is one of the most popular online classifieds sites.
It attracts more than 10,000,000 views
every month and generates more than 10,000 ads and replies every day across its network.





Free Url Submision

SEO Free Url Submission - Website URL submission to 100+ major search engines. Site promotion and search engine optimisation for higher rankings.



Books



Web Design Mastery is being hailed as the "Bible" for web design. Over 500 pages of the exact information you need to create a professional web site specifically designed to sell, with hundreds of copy and paste codes.





Search the Web:







Better Website Performance 2006 ©