Mike's Ecommerce Software          GoDefy          Text Links Ads
 


Add to
Favorites
Marketing Tools Directory | Internet Marketing Experts
Tools Guide | Internet Marketing Tips | Free Marketing Tools
Michael Wong | Submit A Tool | Help
 
Web Mikes-Marketing-Tools.com

Two Ways To Optimize JavaScripts In Web Pages

Last Update: Monday, July 30, 2007.

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%26gt; 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%26gt;... </HEAD%26gt; portion of the HTML file:

<SCRIPT LANGUAGE="JavaScript" SRC="file-name.js">
</SCRIPT%26gt;

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%26nbsp;   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%26gt; tag.

Yes! It really does work! Although it is considered good programming practice to include your JavaScript within the <HEAD%26gt; 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 the editor of GoDefy.com - the world's first online marketing comparison shopping search engine and Mike's Marketing Tools. Michael is also the author of the leading Search Engine Optimization Guide and numerous marketing tips.
Publishing Rights: You may republish this article in your web site, newsletter, or ebook, on the condition that you agree to leave the article, author's signature and photograph, and all links completely intact. Full instructions on how to copy and upload my photo to your server.

Related Marketing Tools Directory Categories:

More Marketing Tips

          

What's New?

NetSuite in:
+ Online Store Builder
+ Shopping Cart Software
Store Stacker in:
+ Affiliate Marketing
Interspire Shopping Cart in:
+ Shopping Cart Software
ClickSweeper in:
+ Bid Management
+ Pay Per Click Advertising
37 Killer AdWords PPC Secrets in:
+ Google AdWords
Omnistar Mailer in:
+ Autoresponder Software
 

Top 10 Best Sellers

1.Text Links Ads - Buy text links to increase traffic & rankings Hot!
2.Definitive Guide to Google AdWords - Beginner & advanced guides to Google AdWords
3.Site Build It! - All-in-one site building, hosting & marketing system
4.Internet Business Promoter - SEO, submission, ranking & link building software
5.Search Engine Optimization Strategies - Beginners' guide to getting top 10 rankings
6.Web CEO - SEO, submission & ranking software
7.OptiLink - Discover how top ranked pages achieved their rankings
8.WebPosition Gold - SEO, submission & ranking software
9.eBook Pro - Creates protected ebooks
10.eCover Generator - Creates virtual ebook & software covers
 

Marketing Tools Directory

Ad Tracking Software
Affiliate Marketing
Affiliate Networks
Affiliate Program Guide
Auction Guide
Audio Marketing
Autoresponder Software
Bid Management
Branding
Business Ideas
Copywriting
Customer Service
Ebook Covers
Ebook Marketing
Email Marketing
Google AdSense
Google AdWords
Internet Marketing Course
Keyword Marketing
Link Popularity Software
Marketing Books
Pay Per Click Advertising
Pay Per Click Search Engines
Pop Up Software
Press Release Writing & Distribution
Pricing
Search Engine Optimization Guide
Search Engine Optimization Software
Search Engine Submission Service
Search Engine Submission Software
Success
Text Link Advertising
Web Site Traffic Analysis
 

Internet Marketing Experts

Armand Morin
Corey Rudl / Derek Gehl - Internet Marketing Center
Declan Dunn - Active Marketplace
Jim Edwards
Jonathan Mizel
Ken Evoy - Site Sell
Marlon Sanders
Michael Campbell
Neil Shearing - ScamFreeZone
Perry Marshall
Yanik Silver - Surefire Marketing
 

Free Marketing Tools

AdWords Wrapper
Keywords - Top 500 updated daily
Link Popularity Checker
Marketing Forum Watch
Search Engine Chart
Search Engine Rankings
 

Copyright © 2002-8 Art Dacor USA LLC. All Rights Reserved.
3727 West Magnolia Blvd #489, Burbank, CA, 91505, USA.
www.Mikes-Marketing-Tools.com