: Does using onclick on div's effect SEO? I have a few elements on my page that uses onclick as the link, e.g: <div class="service" onclick="location.href='<?php echo $fields->service_1_link;
I have a few elements on my page that uses onclick as the link, e.g:
<div class="service" onclick="location.href='<?php echo $fields->service_1_link; ?>'" style="cursor:pointer;">
<img class="service" src="<?php echo $fields->service_1_image; ?>" alt="<?php echo $fields->service_1_name; ?>" height="111" width="299" border="0" />
<div class="service-title"><h2><?php echo $fields->service_1_name; ?></h2></div>
</div>
Does this have an impact on crawlers and SEO over say a normal link?
More posts by @Sent6035632
1 Comments
Sorted by latest first Latest Oldest Best
This is Google's answer: www.google.com/support/webmasters/bin/answer.py?answer=81766
When creating your links, format them
so that they'll offer a static link as
well as call a JavaScript function.
That way you'll have the AJAX
functionality for JavaScript users,
while non-JavaScript users can ignore
the script and follow the link. For
example:
<a href="ajax.htm?foo=32" onClick="navigate('ajax.html#foo=32'); return false">foo 32</a>
Note that the
static link's URL has a parameter
(?foo=32) instead of a fragment
(#foo=32), which is used by the AJAX
code. This is important, as search
engines understand URL parameters but
often ignore fragments. Since you now
offer static links, users and search
engines can link to the exact content
that they want to share or reference.
While we're constantly improving our
crawling capability, using HTML links
remains a strong way to help us (as
well as other search engines, mobile
devices and users) better understand
your site's structure.
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.