SEO Tips for Websites using Java/JSP and JavaScript

1. If you are using java script on your website remember that it is not search engine friendly. So if it is manipulating text make sure the text is made visible to the search engines.

2. To do a 301 redirect on JSP pages effortless alter this code for your own purposes and place it on the page you want to redirect:

response.setHeader( “Location”, “” );
response.setHeader( “Connection”, “close” );

3. Apply text for navigation menu as an alternative of using images or Java scripts.

4. If you completely ought to use Java script drop down menus, image maps or image links, be sure to put text links somewhere on the page for the spiders to follow. Best way is create text links on the bottom of all your pages.

5. Don’t put your content in java script for the reason that crawler finds it very difficult. If your content is hidden in java script it can not be easily exposed.

6. Search engines hate java script so do not try to write it on the main web page as an alternative it should be write on separate page.

7. Create a simple html site map with a simple text link to it from your home page. On the site map make a list of all of your pages with their corresponding links. For the anchor text of those links, use a descriptive keyword or two.

8. Use CSS Menus. The beauty of CSS as an option to java script is that it allows Google and other search engines to read the text of the links and follow them – you get your pages indexed.

9. When calling JavaScript editors place the Java protocols in header of your page: In order to save file size and maximize load times cut out that java protocols and paste it in an external file (i usually call mine java.js) then to call the java I place just this one line of code: <Script src=”java.js”></script> this reduces the file size considerably with no adverse side effects.

10.  There are some times when more code in the header is necessary to operate JAVA script and call css etc. There are advanced techniques that will allow you to pack away the JavaScript and css in external files so that it is called from .js and .css external files.

11.  To call your JAVA script simply cut the JAVA from the header from <script> to </script> and save in a file called java.js and call it using this line of code:

<SCRIPT LANGUAGE=”JavaScript” SRC=”java.js”> </SCRIPT>

Similarly to call your css from and ext file use this line of code:

<link href=”css.css” rel=”stylesheet”>

Most web developers opt for inserting JavaScript codes at the beginning of the HTML file, between the HEADER Tags of the file. Irrespective of the length of the code it is always preferred there. In reality, this placement of the JavaScript code has nothing to do with SEO. A feasible solution is to place the JavaScript code at the bottom of the page, so the important content is at the top of the page.


2 responses

  1. Have you ever considered adding more videos to your blog posts to keep the readers more entertained? I mean I just read through the entire article of yours and it was quite good but since I’m more of a visual learner,I found that to be more helpful well let me know how it turns out. This is good…thanks for sharing

    1. Hi Lou,

      Thanks for your wonderful Suggestion. I will implement this as soon as possible.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: