Two Easy Methods To Optimize Your JavaScript - Get Articles by Steve Shaw

Get Articles
 
  

submit your own reprintable article

Article Categories

Accepting Credit Cards Online
Accounting and Book-Keeping
Advertising
Affiliate and Associate Programs
Articles and Article Promotion
Autoresponders and How To Use Them
Bonuses and Freebies
Branding
Business Ideas
Business Practice
Communication Skills
Competition and Your Competitors
Copywriting
Creativity and Ideas
Customer Service and Support
Domains and Domain Names
Due Diligence
E-Commerce
Ebooks and Ebook Writing
Education
Email List Building
Email Marketing
Ethics and Morals
Expert Status
Ezines and Email Newsletters
Family
Forums
Fraud and Scams
Goal Setting
Graphics and Graphic Design
Guarantees
Health
Internet Auctions
Internet Marketing
Investment and Investing
Job and Career
Joint Ventures
Lead Generation
Legislation and Legal Issues
Management and Best Practice
Motivation
Negotiation
Networking
News Releases and Public Relations
Niche Marketing
Outsourcing
Pay Per Click Search Engines
PC Security and Viruses
Pricing and Supply and Demand
Product Creation
Public Speaking
Publicity
Relationship Building
Reprint Rights
Revenue Generation
Search Engines and SEO
Site Stickiness - Getting Repeat Visitors
Software Reviews
Spam - Unsolicited Commercial Email
Statistics and Tracking
Testimonials
Time Management
Traffic Generation - Getting Hits
Travel
Viral Marketing
Web Hosting
Web Site Design
Working At Home - Starting Out
Blank Page
 
Google
 

> Get Articles > Web Site Design > Two Easy Methods To Optimize Your JavaScript

Two Easy Methods To Optimize Your JavaScript


PDF icon Download as PDF

Steve Shaw
stevetakanomi.com

Technical e-Marketing
http://takanomi.com/newsletter


Two Easy Methods To Optimize Your JavaScript

by Steve Shaw



Many web sites, even those owned by people we all think of as gurus in the Internet marketing business, have large blocks of JavaScript at the top of their web pages, sometimes running to dozens of lines of code.



But did you know that this common practice can have a negative effect on your search engine listings, by pushing your major keywords down the page?



In terms of search engine ranking, it's generally accepted that the higher your keywords are on the page, the better.



This easy-to-follow article will give you two easy ways to make the JavaScript on your web site more search engine friendly, improve your search engine position, and give your traffic levels a nice boost.





1. Move the script to the bottom of the page



This is the easiest method. A lot of JavaScript code can be moved to just above the closing body tag on your web page, without affecting the functionality of your web site.



The best way to do this is simply to test it out and see if it works - if you don't experience any adverse effects and your site appears to continue to perform normally, stick with it.



Your keywords will suddenly be much higher up the page, and your site may even load quicker too with all the code at the bottom.



If you wish, you can also combine this method with the second method as described below.





2. Externalize the script into a .js file



This method has the added advantage that the external .js file containing your JavaScript is often cached in your web visitor's browser, meaning that on subsequent visits your web page will load faster.



It also means you can have the same code on a number of different pages, yet only have a single file to modify and maintain when you want to adjust the script.



Here's how you do it:





Your JavaScript will look something like the following:



<script language=JavaScript>

<!--

your script here - copy this bit into a .js file

//-->

</script>



Ignoring the opening and closing script tags, and the comment tags if you have them, copy the code in the middle into a brand new plain text file - for example, paste the code into a plain text editor like Notepad (don't be tempted to use something like MS Word).



Save this file with a .js extension, for example, 'mycode.js', and upload this page to your server to the same directory as the web page.



To make your web page reference this new .js file, replace the existing JavaScript as shown in the example above, with a single line in the following format:



<script language=JavaScript src=mycode.js></script>



Just replace 'mycode.js' with the name of your own .js file.





Upload your modified web page to your server and test.



And there you have it - a smaller page, improved keyword positioning, quicker load times for your visitors, and easier script maintenance.



As stated above, both these methods can easily be combined if you wish, too.

-----------------------------------------------------------

Technical e-marketer Steve Shaw reveals the technology

behind e-marketing, the stuff the techies don't tell you.

Find out more information at http://takanomi.com/newsletter





How useful did you find this article?

Not at all
A little
Averagely
Fairly
Very
 


This article can be downloaded freely from http://www.get-articles.com and used on your website or in your ezine so long as the author is credited and their resource box left intact. You should not change any links in the article, and where the article is used on a website it's links should be clickable. Please see our terms and conditions page for more information: http://www.get-articles.com/authors-publishers-terms.php
 

Get Articles


Top Articles

  • Stop Saving Money!
    By Leo J Quinn Jr
    Rating 138 / 195
  • The Top Ten Reasons For Being Honest
    By Monique Rider
    Rating 152 / 180
  • Top 10 Qualities of a Great Team Leader
    By Naseem Mariam
    Rating 143 / 180
  • 7 M's of Every Highly Effective Manager
    By Alonzie Scott
    Rating 124 / 175
  • Seven "Secrets/Tips" to Becoming a Millionaire
    By Craig Lock
    Rating 97 / 140
  • Five wonderful steps for good presentation skills:
    By Thomson Chemmanoor
    Rating 44 / 75
  • Do Pop-up Ads Work for Your Site?
    By Brian Su
    Rating 41 / 70
  • How to get your audience involved in your PowerPoint presentation:
    By Thomson Chemmanoor
    Rating 27 / 70
  • TOP TEN TIPS FOR PRESCRIPTION SWIMMING GOGGLES
    By Danielle Ross
    Rating 53 / 65
  • Ten Steps to a Power-Packed, Persuasive Proposal
    By Linda Elizabeth Alexander
    Rating 46 / 65
  • Insider Rollout Secrets Review
    By Alex Poole
    Rating 52 / 55
  • The 7 Signs of a Scam
    By Sharon Davis
    Rating 42 / 50
  • How to write a communication plan
    By Matt Eliason
    Rating 38 / 50
  • The MSN Ranking Code Loophole
    By Chris Rempel and Dave Kelly
    Rating 38 / 50
  • 12-Step Foolproof Sales Letter Template
    By David Frey
    Rating 41 / 45
  • Tips For Non-Sexist Writing
    By Tanja Rosteck
    Rating 35 / 45
  • Preventing Fraud On Your Website
    By Aaron Turpen
    Rating 32 / 40
  • Useless Resume Objectives
    By Rita Fisher, CPRW
    Rating 10 / 40
  • Hacker Prevention Techniques
    By Aaron Turpen
    Rating 30 / 35
  • 6 Steps to Great Customer Service
    By Aaron Turpen
    Rating 25 / 35

    May 28, 2012 © www.Get-Articles.com. All Rights Reserved.