PDA

View Full Version : The NOSCRIPT Tag


glengara
14-08-2001, 05:16/05:16AM
I've recently come across the <NOSCRIPT> tag as a means of presenting a HTML version of a page. Anyone have further information or experience in its use?
I'm assuming it's a meta.

ihelpyou
14-08-2001, 08:08/08:08AM
hmmmm, no experience with that one.

Blue
14-08-2001, 13:09/01:09PM
Hi glengara,

The <NOSCRIPT> tag is a Document Structure Tag which means it is used to define some portion of the structure of your document. It is directly related to the <SCRIPT> tag.

It is a Container type tag, meaning it needs to be closed via it's companion </NOSCRIPT>.

It's Function is to provide alternate content to use if a script cannot be executed. A browser might not be able to execute a script because the user has turned scripting off or because it does not know the scripting language used to write the script.

It's Syntax is:

<NOSCRIPT>
... alternative to script code goes here ...
</NOSCRIPT>

It has no Attributes.

And here is an Example:

<SCRIPT LANGUAGE="VBScript">
document.write("Hello, World!");
</SCRIPT>
<NOSCRIPT>
You either have scripting turned off or your browser does
not understand VBScript.
</NOSCRIPT>

Browsers that don't support any scripting languages will ignore the <SCRIPT> and <NOSCRIPT> tags and simply render what you have placed between your <NOSCRIPT> and </NOSCRIPT> tags. Thus, no matter what kind of browser a user has, your <NOSCRIPT> content will be displayed when it is appropriate.

I beleive there are some relevant posts in these forums concerning the use of this tag in conjunction with SEO. Do a search for "noscript" and you should find them.

Hope this helps,

ihelpyou
14-08-2001, 13:15/01:15PM
Okay. Since we know that spiders ignore js scripts, would this <noscript> tag make any difference if content was put into it? Isn't that tag just another javascript tag? iF so, the spiders would ignore it anyway.

Blue
14-08-2001, 13:40/01:40PM
Well, to my somewhat skewed way of thinking (and this is completely supposition lol), it would seem to me to be just the opposite.

I don't beleive it is a javascript tag but rather a "this is not javascript" tag, or more specifically, a "this is not any kind of script" tag "so therefore, "treat anything between this tag as either text or HTML". However, I have no data to back this up.

I would really love to hear from someone who has hard evidence one way or the other (maybe Sharon & Roy?).

Also, there is the "keep your scripts external if at all possible" SEO rule, which gets me to wondering how one would apply the <NOSCRIPT> tag in that situation. Before I learned this was good SEO wisdom, I used the <NOSCRIPT> tags when appropriate. So now I'm at a loss as to what to do.

Other opinions?

Blue
14-08-2001, 15:11/03:11PM
See next post-->

ihelpyou
14-08-2001, 15:16/03:16PM
hey Blue, that thread addresses the <noframes> tag. We have not discussed the <noscript> tag as yet. There is no info that I have run across about this tag and the engines.

glengara
14-08-2001, 18:29/06:29PM
First came across mention of this <NOSCRIPT> in a post about submitting to Y! with a JS nav bar

Q *...but if you disable javascript, the main navigation bar is completely gone. Do you think the editors will let this pass since you can view the site in multiple browsers?*

A1 * If you really want to be 100% sure and 100% aboveboard, use the NOSCRIPT tag around a normal HTML nav bar, and leave it there forever.
This costs you nothing, and actually helps people who have Javascript turned or are using a text-only browser (there are good reasons for this also, e.g. for blind surfers).

A2 *include a <noscript> tag where the javascript nav bar should be, and if javascript is disabled, your HTML nav bar would show up.*

Then I got a lead to this

http://www.w3.org/TR/html4/interact/scripts.html#h-18.3.1

18.3.1 The NOSCRIPT element

<!ELEMENT NOSCRIPT - - (%block;)+
-- alternate content container for non script-based rendering -->
<!ATTLIST NOSCRIPT
%attrs; -- %coreattrs, %i18n, %events --
>

Start tag: required, End tag: required
The NOSCRIPT element allows authors to provide alternate content when a script is not executed. The content of a NOSCRIPT element should only be rendered by a script-aware user agent in the following cases:

* The user agent is configured not to evaluate scripts.
* The user agent doesn't support a scripting language invoked by a SCRIPT element earlier in the document.


User agents that do not support client-side scripts must render this element's contents.
In the following example, a user agent that executes the SCRIPT will include some dynamically created data in the document. If the user agent doesn't support scripts, the user may still retrieve the data through a link.


<SCRIPT type="text/tcl">
...some Tcl script to insert data...
</SCRIPT>
<NOSCRIPT>
<P>Access the <A href="http://someplace.com/data">data.</A>
</NOSCRIPT>

Now all I need is a Laymans Translation.

Blue
14-08-2001, 18:52/06:52PM
<noframes>...<noscript>...<noFRAMES>...<noSCRIPT>...<NOFRAMES>...<NOSCRIPT>...AHHHHHHHH!! It's all getting to be too much for me :bouncy: (just kidding)...My bad, Doug.

~~

glengara:

I think that the W3C was saying the exact same thing that I said earlier. When they say "element", they mean an HTML Tag. When they say "user agent", they mean a browser. And they are basically saying that one might wish to use the <NOSCRIPT> tag in situations where one will be serving scripted pages to older browsers, to people who have scripting turned off in their browsers, and to handicapped (blind or deaf) users. If you have any questions, feel free to PM or email me.

~~~

Now we just need the SE's perspective on this tag...

ihelpyou
14-08-2001, 19:00/07:00PM
Yes. I knew about the tag in reference to agents, etc. Do not believe it would apply to a Yahoo editor thought as there is no way they would review a site with js turned off.

Actually, these days maybe only 1/2 of 1% of agents visiting your site would have it off. Most would be robots.

That is the key question,.... how do the engines handle this tag?

Sharon & Roy
14-08-2001, 19:43/07:43PM
Originally posted by Blue

I would really love to hear from someone who has hard evidence one way or the other (maybe Sharon & Roy?).

Thanks Blue for the vote of confidence, and it just so happens that we KNOW that Google DOES index the contents of a <noscript> tag.

This might perhaps be one of the least known "secrets" about SEO.

Without showing the whole world our somewhat confidential tests & results, here is what we have created for YOU to test this on your own and see the evidence for sure, and not only in Google but which of the others do also, since we don't really know, as we only test for Google (right now that is).

(If you use OUR LINK PAGE (http://www.iwon.net/articles/seo/tests/spider-followed-a-noscript-link.shtml) to do your test, there should be ONLY one link to it, so maybe Doug may set up a place here on the forums to use for testing, and not only this but also other things not readily obvious or known? Doug?)


Just enter the following on any Web Page and once it has been spidered and indexed by the Search Engines test to see if its text and link are indexed by copying and pasting any part of the text or by entering the URL into the Search Engines you want to test.

(PLEASE NOTE: Change the "Link Page" below and create your own if you are not Blue or Doug and wish to test this for yourself, thank you.)

<noscript>
This is the "&lt;noscript&gt; tag" Example
<p>This text is contained within the &lt;noscript&gt; tag of a Web Page as a TEST -- Search Engine spiders/robots will be tested to see if they index this text and follow links.</p>
<p><a href="http://www.iwon.net/articles/seo/tests/spider-followed-a-noscript-link.shtml">this is the link to test which search engine spiders follow &lt;noscript&gt; links</A>
</noscript>

ihelpyou
14-08-2001, 19:53/07:53PM
You have to put in the <code> tags to show any scripting in the post. :)

I cannot test here as I do not wish to risk anything yet with the code. I would have to think about this as it might seem a bit spammy to insert keyword phrases into this tag just for the robots.

Let me think. ;)

Sharon & Roy
14-08-2001, 20:34/08:34PM
Originally posted by ihelpyou

Let me think. ;)

No, problem, Doug, just thought to throw out the idea to you.

Blue, if you want to test this on your Site and need our help, just eMail or Phone us and we'll gladly help you.

glengara
15-08-2001, 04:44/04:44AM
So, in theory I can construct a basic sponge cake (text link nav-bar), put the icing on it (JS nav-bar), and be able to offer my guests a slice of their choice?

I'm also dreaming that by inserting a link within the tags you can create an alternative to a JS re-direct; but.. I've just heard the alarm go off.

ihelpyou
15-08-2001, 06:34/06:34AM
The biggest problem with all this is that if the spiders do index what is between the tag, this would open up big-time all the spammers out there. The tag would be abused. A spam-city wave would start.

I will pass on this tag for now.

glengara
17-08-2001, 13:44/01:44PM
IMO we'll be seeing a lot more of this tag. In view of USGov 508 compliance, it seems one of the simplest methods of adding accessibility to a site. The Tortoise School (if I could contact Markymark) would probably reccomend starting to build-in accessability now.

ihelpyou
17-08-2001, 13:52/01:52PM
Yep. You are probably right about that.

JuniorHarris
21-08-2001, 14:51/02:51PM
I suppose whether an engine considers <noscript> content depends on the engine. Sharon & Roy's suggestion that Google does see this makes since, as Google does great full page indexing. It's utilization for 508 compliance may indeed increase for accessibility, but will it do anything (good or bad) for rankings? And if effective, I suppose it will no more be abused then <noframes> or other such well-intended tags.

glengara
21-08-2001, 15:10/03:10PM
My interest in its ranking potential is more general, ie when an SE will decide that accessability is a Good Thing and award "points" for accessible sites.