Do google still ignore Javascript for crawling?

wonsong82

Registered Member
Joined
Jan 24, 2011
Messages
85
Reaction score
3
As title asked,

do google ignore javascript and css?

Starting as a flash designer at first, I have developed a tendancy of creating a website as plain semantic markups and use css & javascript to give alot of visual effects to the site.

One of the technique I use the most, to make a site look like a flash site with javascript, is that I first make a meaningful markup from plain html, then grab the contents within the markup then save it to javascript variable, then delete the contents in the markup, and play around with the contents.

For example,

on my html, i have
---------------------------------------
<div id="aaa">
<img src="1" />
<img src="2" />
<img src="3" />
</div>

then from my javascript,

$imgs = $('#aaa a'); // grab images and save it to a variable
$('#aaa').html(''); // delete the contents

$gallery = XXX; // manupulate the contents to get the effects i want

$('#aaa').html($gallery); // insert back the generated content

------------------------------------
If i do this, will crawler completely ignore the javascript and newly generated contents, and just crawl the original html?

To me, this doesn't like a valid way to crawl if i were a google.

cuz i can simply create a html page with any kind of unrelated content just to show it to the crawler, and make a different set of content to show it to the users, which can cause alot of problem if this is how google is doing.


Anyone has answer to it?

This could be applied to css as well.

you can make a unrelated content just for SEO and use style="display:block" to hide it.

I am pretty sure google has a method of prevention but just wanna get a confirm, or if anyone knows, how does google prevent them.

I read from somewhere google is now able to crawl parts of javascript, from the written code, to get the links from javascript.
 
If it's normal java google read it perfectly fine.

It's what your intentions are that could get you banned but not likely.

Hiding text on purpose for instance is against the rules.

But java is a crucual part to the function of most sites so they read it and index it fine.
 
go0gle never used to crawl javascript content, but it may have changed. i try stay away from loading to much content with javascript just to be safe
 
I don't think it changed, never heard that Google crawl JS
 
Who said Google doesn't crawls JS, CSS and other embedded files? I never saw them saying them (correct me if I'm wrong). When Google can index the whole web, rank them accordingly then how can you assume that they don't have the system to read javascript and how it interacts with the browser. Google gives user experience a great importance and javascript play a very important part in it. I've seen few threads here popping up saying that people lost rankings after using content lockers on sites which again is a part of bad user experience. Yeah, G doesn't shows you all the crawled files on your website with site operator but that doesn't means they do not crawl them.
 
I can confirm that Google most definitely can crawl and execute javascript. I don't know that they always do, but I have seen first hand that Googlebot executes javascript at least some of the time.

Also, if you take a look at the Google Instant Previews, lightbox style overlays (triggered by javascript) get shown in the preview images.
 
Yeah google does read java these days and will execute it at times. It was an update to googlebot quite a long time ago.
 
Dear me, the standard of seo knowledge in here is diabolical.
 
Google does crawl java-script. However, they will generally not index it.

Example Scenarios:
Given: No meta description

Google will crawl the page to extrapolate from any content on the page.

So if we have the following:
Code:
<p>Google is <javascript-code>NOT</javascript-code> cool!</p>

In the serps you would see:

Google is cool!

A user would see (provided js is enabled):

Google is NOT cool!
 
I have worked on some of the largest sites around - say 1m+ indexed pages and I can report that googlebot does not execute javascript for indexing purposes. This is not smoke and mirrors here guys - get a clue.

In order to execute javascript (not java btw - whoever was using this interchangeably is wrong) you have to load it up in a DOM (document object model) which is extremely cpu intensive - there is no evidence that this is occuring with rather a straight web request of the initial static html occuring.

There are a lot of websites out there and a massive amount of pages appearing every hour - even the mighty google does not have that amount of processing power to execute javascript on every page.

Think about it. How long do you think a googlebot is going to wait on your page for a bit of jQuery to pump out some content somewhere after a certain event that you have bound is going to trigger?

Keep it real guys.
 
Think about it. How long do you think a googlebot is going to wait on your page for a bit of jQuery to pump out some content somewhere after a certain event that you have bound is going to trigger?

Keep it real guys.

You might want to consider that Google likes jquery so much that they host their own cache of it. Writing a parser for jquery events would be fairly trivial... If you take a look at some the javascript that the Google engineers write, it is fairly god-like. Also since Google controls ~6% of the world's computing resources, I'm not sure the CPU-intensiveness argument is really valid anymore.

I have seen javascript EXECUTED (not just parsed) on my own sites and links and redirects followed and indexed by Googlebot. I know what I'm doing and there was literally no way that those links and redirects could have been followed if Gbot wasn't executing javascript.

The most extreme example was: jquery used to pop a fullscreen lightbox-style with an iframe in it. Contents of iframe takes control of parent and redirects to my ad page. All the js used was seriously obfuscated, chopped up into tiny variables, shuffled, and then put back together and eval'ed for execution by the browser (meaning that no urls could be parsed from the js itself). Gbot followed the redirect and my sites got shafted.

I suspect that they would only mess around with your js in situations where they already have spammy signals about a site. That's not to say that you can't still get away with lots of dodgy shit using js, but they can fuck with you if you give them reason to.
 
Googlebot does not execute javascript, in the serps you will see your page being indexed without javascript code executed.

But it can detect certain javascript functions, I got slapped once for having content hidden and displayed using javascript.

So your results may vary. I don't think obfuscating the script would help, the bot could actually execute javascript if it wants to, i see no reason why it couldn't.

A possible check would be to include javascript from an external file and see who downloads it. But I'm under the impression that google does not always use the googlebot user agent.. why would they? :)
 
Google wrote the V8 JavaScript Engine. I'm sure they can handle webpages with JavaScript just fine.
 
Back
Top