Krishna Shasankar's Life Blog

This blog is a HTML virus which will format your C: Drive ..... Be Careful :)

Thursday, July 06, 2006

NOSCRIPT Problem...

I was working on these javascript menus when i came across this problem with java-script, there is an option in every browser that allows you to configure the browser in such a way that it can be made to disable java-script processing (i.e, all the java-script based coding in the pages will not be displayed by the browser), there was nothing much to worry about in this regard since most of the visitors do’nt do that, so i expected things to go well, but to my astonishment i came to know very lately from some SEO(Search Engine Optimization) Expert, that google too has the same habit of not processing Javascript, this means i was in trouble, the entire site navigation system was not being understood by google, i cant go ahead and change these hundreds and thousands of pages with a new navigation system, the solution to the problem is <NOSCRIPT> tag

Lemme explain how no script tag works, Javascript technology was developed by Netscape, when Javascript was first introduced, microsoft browsers(IE) at first it didnt have inherent capabilities to process it, the power and flexiblity of javascript made it one of the most successful scripting technologies, placing it much ahead of its nearest competitor (VBScript , a Microsoft Product), scripting generally refers to javascript although we can use any other language to write scripts, While microsoft and netscape while waging scripting wars, most other browsers didnt even had support for any of the scripting technologies. This led to a confusion Javascripts pages wont render properly in IE, VBScript wont render in Netscape, Some browser X will not support neither of the technologies.

This led W3C to introduce a tag called NOSCRIPT which will render some information if the client browser dosent support scripting….

Lets take the scenario where i am creating an Javascript menu, this wont render in the scripting-disabled browser properly

Th_js-menu

[A normal javascript menu in a javascript enabled browser]

Th_no-js-menu

[A normal javascript menu in a javascript disabled browser (Google looks at your site like this)]

As u can see the browser didnt render the javascript menu since javascript processing was disabled

Noscript-code
Now if we add a NOscript tage and put the navigation system in place , this will work if the browser doesn’t render Javascript menus

Th_noscript-menu

[An optimized navigation system for no-js browsers and search engine bots, NOSCRIPT tage also improves your page ranking in google]

Why is this so important if 98% of the browsers have scripting enabled?

Nothing really matters if the percentage of non-scripting browsers in 2%, but unfortunately GOOGLE falls in that 2% and for that matter none of the prominent search engines can’t process Javascript, so if u have your site navigation systm designed in Javascript, forget it, google wont read it…. it means your site is not accessible to google, this reduces a lot of clicks to your site… If you work in SEO you will know how much troble your site is in.

The Solution :

Use an optimized text links menu to replace your navigation system inside a <NOSCRIPT> Tag jus below your script. It will do the trick and will also improve the your page rank in google pagerank.

Labels:

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home