Forum Moderators: open

Message Too Old, No Replies

Google & Javascript

Whats the Verdict?

         

xcandyman

12:43 pm on Aug 23, 2002 (gmt 0)

10+ Year Member



Hi All

Ive been asked by my peers to explain why you can't add too much javascript on a page in the search engines pov, and I cannot think of a explanation that wont confuse them totally If anyone could direct me to a post or to post here it would be of great help.

Thanks

Phil McRevis

[edited by: xcandyman at 1:47 pm (utc) on Aug. 23, 2002]

DerekJPreston

1:19 pm on Aug 23, 2002 (gmt 0)

10+ Year Member



Greetings,

Although I'm not an expert on Google, I have found evidence that they only read the first 100k of any file. If you put lots of javascript in your page, then their robot may not reach the later text.

File truncation is quite normal amongst robots. Google's appears to do it, our's does also and in past experiments I've observed and confirmed this behaviour in others too.

There are probably other factors which affect Google and javascript such as their file parser however I'll let other people here share their knowledge on the subject.

As for file truncation, 100+ k files should be avoided anyway. Fine for people who like me are currently sitting on an N meg link to the internet. Possibly not so great for modem users. In reality, file truncation is not a major issue.

Best regards,

Derek J. Preston
Head of Technology
Mirago plc

startup

2:06 pm on Aug 23, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Don't use too much of it relative to the total page size and you won't have any problems. Keep the links in basic html and use text high up on the page. EG, you don't want to have 3k of code before the text.

xcandyman

2:33 pm on Aug 23, 2002 (gmt 0)

10+ Year Member



Thanks

You have helped me explain it better to the people I work for. I usually go kicking and screaming while the designers put HUGE amounts of scripting on the top of the content.

I had a good understanding with our last designer and I worked close with him at the design stage but there's no chance at this new place with over 10 designers I don't know who's doing what LOL. And if I do find who's doing the design they are so fixed on what they want I find it impossible to getting them think about what the search engines see when they look at the source of the page.

When will designers ever learn LOL

Phil McRevis

startup

2:44 pm on Aug 23, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Maybe a little late but, welcome to Webmaster World.
You can remove all the JS code from the page by using a file. Simular to a css file. I have left js and css on page just to bloat the page to the desired size.
I am the worst designer on the net. Find a good one and work with them.

[edited by: startup at 2:48 pm (utc) on Aug. 23, 2002]

ukgimp

2:46 pm on Aug 23, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



What is stopping you calling an external js file.

<script src="foo.js" type="text/javascript">
</script>

<added>Startup beat me to it</added>

[edited by: ukgimp at 2:47 pm (utc) on Aug. 23, 2002]

xcandyman

2:46 pm on Aug 23, 2002 (gmt 0)

10+ Year Member



I dont even like doing that. Im a true HTML junkie LOL.

Phil McRevis

xcandyman

2:50 pm on Aug 23, 2002 (gmt 0)

10+ Year Member



I may be pretty new to the these forums but not new to SEO been in the business nearly 3 years now. I just needed help to explain to my superiors ( if u can call them that ) why javascript can be bad for SEO.

I do what I'm good at and thats SEO not trying to explain every last detail of SEO to a old fashioned Director. Hooo Hmmm

Phil McRevis

startup

2:56 pm on Aug 23, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Concider using the off page files. When you are targetting a specific page size for many reasons, adding and removing code helps.