How to remove client side scripting

Written by sue smith Google
  • Share
  • Tweet
  • Share
  • Pin
  • Email
How to remove client side scripting
Client side scripting can be found in various areas of website code. (Dynamic Graphics/Dynamic Graphics Group/Getty Images)

Removing client side scripting from a website is a straightforward task. There are various places where client side scripts may be found, so to remove it, check in each of these locations. If you need to remove only part of the client side code for a website, you may need to edit files rather than remove them completely. Client side coding comes in many forms, but the most common language used for it is JavaScript.

Skill level:
Moderately Easy

Other People Are Reading

Instructions

  1. 1

    Store a back-up of the files from your site directories before you start removing anything. There may be code that is necessary, so be careful about what you remove. Look through the content of your site and start locating the client side scripting, including those files in the root directory and also any sub-directories. Using an FTP program you can browse the content of your site directories at a glance. Client side script may be contained within Web pages or within separate files. For JavaScript, the file extension ".js" is used. (See References 1, 2)

  2. 2

    Remove client side script files from your Web server. If you are removing all the client side code from a site, look through each directory and remove any files having the appropriate extensions, for example, ".js" for JavaScript. If you are attempting to remove only part of the client side code from your site, look through these files for the functions you wish to remove. A JavaScript function has the following form:

    function myFunctionName()

    { alert("This is the function code"); }

    (See References 1, 2)

  3. 3

    Remove any references to deleted files from the pages on your site. JavaScript files are called from within the HTML that makes up website pages. Typically this is done within the page head section as follows:

    <head>

    <script type="text/javascript" src="myscript.js"></script>

    </head>

    In this case, remove everything from the opening to the closing script tag, taking care to leave other elements in place, such as the head tags. Go through each file that contains the HTML for your website and remove the script references accordingly.

  4. 4

    Remove any client side scripts from the head sections of your website pages. As well as linking to external scripts, HTML head sections can also contain the scripts themselves. In this case the following structure is used:

    <script type="text/javascript">

    function myFunctionName()

    { alert("This is the function code"); }

    </script>

    As with external scripts, take care to remove only those functions you do not need anymore.

  5. 5

    Remove client side scripting from the body sections of your website HTML. Client side script can appear within the body of an HTML page alongside the page elements as follows:

    <body>

    <script type="text/javascript">

    document.write("Some page content");

    </script>

    </body>

    Look through all of the HTML for your website and remove any scripting you do not wish to use.

Tips and warnings

  • Don't worry if you do not understand the detail within the client side code, you should still be able to effectively remove it.
  • Do not completely delete any client side code or files straight away. Remove the code from your website, keeping local copies, and check that the site still works properly before deleting anything for good.

Don't Miss

Filter:
  • All types
  • Articles
  • Slideshows
  • Videos
Sort:
  • Most relevant
  • Most popular
  • Most recent

No articles available

No slideshows available

No videos available

By using the eHow.co.uk site, you consent to the use of cookies. For more information, please see our Cookie policy.