Glend Article

  • Home
  • About
  • Contact US
  • Resource
  • Serivce
  • Top Affiliate Networks

Removing JavaScript From A Website

Author: glend

As web pages get increasingly more advanced so does the amount of code needed. The result may be a beautiful looking page that performs many things well…except ranking highly in the search engines. Search engine spiders are fussy eaters and don’t really like anything with their HTML, especially not a side order of JavaScript.

First check the source code of your web page, especially the <head> section as this is where most JavaScript is placed. For example, if your page includes rollover buttons it’s probably heavy with JavaScript. All this code gets in the way of the spiders and doesn’t help in achieving good rankings for your site. But there’s an answer - remove it. The beauty is that removing this code from each page not only makes your page more ‘digestible’ for search engines but it also makes the maintenance of the JavaScript code easier.

The Two Step Plan
1. Highlight all the JavaScript in your page in between (not including) the <script language=”javascript”> and the </script>, and then copy and paste it into a new notepad document (or whatever you use). Save this document as ’scripts.js’. On your web page you should now be left with <script language=”javascript” type=”text/javascript”> and then </script>. Now all you need to do is add the address of this external JavaScript page into the opening JavaScript tag, something like this:

<script language=”javascript” src=”scripts.js” type=”text/javascript”></script>

This tag now tells the browser that it should go to scripts.js to get all the relevant JavaScript code for the page.

2. Upload the external JavaScript page (scripts.js) to your web site and then replace all the existing JavaScript code in the section of your pages with just the one single line;

<script language=”javascript” src=”scripts.js” type=”text/javascript”></script>

This example assumes that your external JavaScript page and your web pages are all being uploaded into the root directory, if they are not then you will have to check the url of the src=”scripts.js” on each page to make sure the JavaScript is working properly.

The advantage of having all your JavaScript on one page is that if you have to make any changes to it you only need to do it once instead of going into every page of your site and making the same change.

If you have two sets of JavaScript code then just do this twice so you end up with the following in your <head> tag:

<script language=”javascript” src=”scripts1.js”></script>
     <script language=”javascript” src=”scripts2.js”></script>

More Web Page Diet Plans
Removing other bits of code to slim your pages down and make them easier to maintain and help them perform better in the search engines can be achieved by using CSS (Cascading Style Sheets) and SSI (Server Side Includes).

CSS code can be placed onto an external file exactly like JavaScript can. SSI can allow you to take standard elements of your web page (eg. logo, footer or navigation) and place that code onto an external file.

So you can then update your navigation by simply modifying one file, instead of going into every page and doing it.

To find out about CSS here are some sites to start you off gently:
. http://htmlgoodies.earthweb.com/beyond/css.html
. http://www.websitetips.com/css/index.shtml
. http://www.w3schools.com/css/default.asp

For help with SSI try:
. http://www.websitetips.com/ssi/index.html
. http://www.smartwebby.com/web_site_design/server_side_includes.asp

If you use PHP or ASP pages, then here’s how to include includes;
. http://www.outfront.net/tutorials_02/getting_started/includes2.htm
. http://www.hardcoder.com/scripting/php/include_files.php

This entry was posted on Friday, July 18th, 2008 at 3:20 am and is filed under Affiliate Tips. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

Leave a Reply

You must be logged in to post a comment.

    • Buy Text Links
    • Text Links
    • Order Text Link Here
  • Archives

    • December 2008
    • November 2008
    • September 2008
    • August 2008
    • July 2008
    • June 2008
    • May 2008
    • April 2008
    • March 2008
    • February 2008
    • January 2008
    • December 2007
    • November 2007
    • October 2007
    • August 2007
  • Categories

    • Affiliate Tips
    • CPA Networks
    • Google Adwords
    • Landing Pages
    • PPC Search Engine
    • Work At Home
  • Hot Link

    • Affiliate Account Manager Online
    • Best CPA NetWork
  •  

    February 2012
    M T W T F S S
    « Dec    
     12345
    6789101112
    13141516171819
    20212223242526
    272829  
  • Tags

    Ask2link Buy text links clean credit CPA affiliate credit repair Landing Pages making money repair credit sell links Work At Home

Copyright © 2012 - Glend Article | Entries (RSS) | Comments (RSS)