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.
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.