Forum Moderators: open
I have seen NOSCRIPT used after java scripting code with KEY WORDS used in place of the ubiquitous "Your browser does not support script..."
If key words are used in NOSCRIPT and the NOSCRIPT/Java coding appears relatively close to the top of the page, will Google penalize this as spam, simply ignore it, or <gulp> treat as regular page text?
From the W3C - 18.3.1 The NOSCRIPT element [w3.org]
<!ELEMENT NOSCRIPT - - (%block;)+
-- alternate content container for non script-based rendering -->
I use external JavaScript to display last-modified dates on a few sites using toLocaleString to put it into the user's local time format. However, if JS is disabled, I revert to a plain-vanilla #echo var="LAST_MODIFIED" SSI call.
Google faithfully displays the last-modified dates of these pages in the SERPs if I search for the text that surrounds the above code. It is not displayed in the locale format, but in the default SSI format.
Conclusion: Anything you put inside <noscript> tags will be seen by users who surf with JS disabled, and can be indexed by Google. Keep it clean -- useful to your visitors.
Note that pages loaded from the Google cache will properly call their external JS files, so go by the SERPs, not the cache, when testing.
The ubiquitous, "Your browser does not support script/frames..." just means the site's webmaster has some more learning and work to do. :( <frames> and <script> should always be backed up by alternative content for browsers which don't support them or for users who choose to disable scripting. It's a usability issue. Do a search on Google for "Your browser doesn't support" for a bit of fun - 2,370,000 results!
Jim
i guess your SSI code don't run correctly, it's not that u expect it is, if u have SSI to display time, u shouln't and needn't use js to do it.
if u expect the SSI run only when js disabled and "run" noscript tag, u'll be disappointed.
and u seems to mix "SERPs" and "cache"
IMHO, cache does cache the whole page, and index it nicely
but SERPs can't run the js code, so what it can is to index noscript tag(it may not, but it does) u confirmed that, thanks :)
for the browser viewing google cache, same thing happend as if they're browsing the origin website
cos the cache is exactly same as what the bot grab from the website
except that, a table of google put in the top, and all keywords hilighted
My JS code displays the last-modified time adjusted to the user's location. If no JS, revert to SSI which displays the last-modified time relative to the server location as a fallback. It works well, thank you.
I did not confuse the SERPs and the cache - I thought I was quite specific.
This is all off-topic, anyway. My point above is that <noscript> -enclosed contents show up in the SERPs and in the cache at Google.
Jim