Forum Moderators: Robert Charlton & goodroi

Message Too Old, No Replies

Javascript and Google search index

can I add a simple javascript to my homepage

         

JPcinemamaster

4:51 pm on Feb 8, 2007 (gmt 0)

10+ Year Member



Hello, I noticed that few of my pages are starting to get indexed in Google, my homepage has regular old html links, but here is my question.
I want to add a simple Javascript that will display the time/date at the bottom of my homepage.
Because my website is new, I don't want to hurt the crawlers/spiders process, so is it ok for me to have a javascript on the homepage solely for the time/date? Will adding javascript to my homepage hurt getting indexed even though the script has nothing to do with the html links?

*Thank you
JP

MThiessen

6:23 pm on Feb 8, 2007 (gmt 0)

10+ Year Member



Most spiders, including google, do not read javascript. The spider will just ignore it, so no it won't hurt anything.

JPcinemamaster

7:42 pm on Feb 8, 2007 (gmt 0)

10+ Year Member



Thanks :)

alfawolf7

8:13 pm on Feb 8, 2007 (gmt 0)

10+ Year Member




Responding to the post above which says "Most spiders, including google, do not read javascript...."

This is NOT correct.

1) Google reads everything.

Hence there is a debate as to if one should place the javascript in external files if it takes up too much room. (Just like placing .css into external files to allow a faster read by the robot).

AND OBVIOUSLY there are hundreds of well indexed js-only sites!

tedster

8:50 pm on Feb 8, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



It is closer to truth if we say that spiders do not execute javascript - to begin with the security implications would be extreme. But spiders certainly can and do take javascript home where people in hazmat suits might play with it in a more protected enviroment.

[edited by: tedster at 2:51 am (utc) on Feb. 10, 2007]

alfawolf7

9:44 pm on Feb 8, 2007 (gmt 0)

10+ Year Member



I want to re-say with total belief in my words that GOOGLE READS JAVASCRIPT and, per example: WILL re-direct itself from javascript.

The security comes from the servers not the robots.

JPcinemamaster

7:53 pm on Feb 9, 2007 (gmt 0)

10+ Year Member



ok, I guess it's safe to have javascript on my homepage only if it's use for the little date/time script.
Html pages are just in regular old tables.

activeco

9:28 pm on Feb 9, 2007 (gmt 0)

10+ Year Member



ok, I guess it's safe to have javascript on my homepage only if it's use for the little date/time script.

You can use any (non evil) javascript without any fear.
Read carefully the Tedster's last message for better understanding.

MThiessen

10:20 pm on Feb 9, 2007 (gmt 0)

10+ Year Member



This is NOT correct.

Yes it is. Google does NOT excute java, it ignores it. Research it, you will see.

[webmasterworld.com...]
[webmasterworld.com...]
[webmasterworld.com...]

Some links in WW about it. It "reads" it insofar as it can tell if there is a url in it, or if it is a known blackhat script, but it does not excute it, and other then reading the url it ignores it.

Edit: added links

[edited by: MThiessen at 10:30 pm (utc) on Feb. 9, 2007]

amb7

10:51 pm on Feb 9, 2007 (gmt 0)

10+ Year Member



This is actually a seriously important topic.

I thought about it in detail since my post yesterday.

Let me explain why I still stay with my argument that Google reads --- and will at times follow your javascript instructions.

Having spent the best part of 3 years 10 hours a day infront of computer screens to try and boost my keyword ranking I now wish to protect my source code and use a very good program which encrypts everything save H1 - H6, meta data and webmaster comment tags. (The only drawback is that it makes my pages suffer a little in ranking owing to non-valid XHTML - but that is a debate in of itself).

Ok: So the site is READ as follows:

"v3w2itruq2ruq23" META DATA "sdfarw3qr"+"asfefg3q324gbv" H1 ....
H2 ... H3 .... H2 ... H1 .... "dfarwe3q" and </html>

The result is that I am actually forcing Google to see what I want it to read. The rest of the page is seen as non-readable javascript and NOT as spam. I am sure of this. I have 140 keywords in the top ten.

My point is that IF in this mix of encrypted and not encrypted source code I add pop under javascripts THEY SHOW UP on google as per example the TITLE OF A PICTURE! Hence I am sure that JS is read.

THE QUESTION HERE:

Is it an idea to place in the <noscript> zone keywords in a sentence that says "no script..and then add (white hat, no spam) keywords ."?

amb7

10:57 pm on Feb 9, 2007 (gmt 0)

10+ Year Member



In post [webmasterworld.com...] Brett Tabke says:

"...Google will read ANY HTTP that looks like a url on a page - even if it is in Javascript. Just use full absolute urls and don't break the lines and Gbot will read your js links just fine."


--- THE POINT BEING THAT JS IS READ!

THANKS! BRAVO THE KING OF SEO!

amb7

11:04 pm on Feb 9, 2007 (gmt 0)

10+ Year Member



At 1:53 pm on May 21, 2005 another post Brett says at [webmasterworld.com...]

> read js

Not that we know of on an ongoing basis.

> can they read urls in js

yes if they are bare http's, but not if they are interpreted or variablized. (the js is NOT executed that we know of, but many expect that to change any day now)."

AND AGAIN THIS IS MY POINT!

amb7

11:07 pm on Feb 9, 2007 (gmt 0)

10+ Year Member



The question is now 1) does google read MORE than URI's and 2) Can we force it to execute js?

Lets debate!

activeco

12:08 am on Feb 10, 2007 (gmt 0)

10+ Year Member



- AFAIK, having more nicks is not allowed here.

Noone disagree that Google reads javascript and gets some text from it. Mostly it gets additional links from there.
The common consensus is (based on many credible experiences) it doesn't execute javascript though. Not that it is not possible outside browser, it would be simply enormous resources hungry.

jomaxx

12:08 am on Feb 10, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



1) Google does a little more than use fully-defined URLs. I've also seen it "guess" incorrectly at page names or partial URLs that it sees. This could alternatively be due to seeing these incorrect guessed URLs on some kind of scraper site; it's pretty hard to distinguish between the two situations.

2) No.

MThiessen

12:19 am on Feb 10, 2007 (gmt 0)

10+ Year Member



THE POINT BEING THAT JS IS READ!

So? What's your point? It's not excuted, that's the point.